mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Add a new private version to the builtin dict type
Issue #26058: Add a new private version to the builtin dict type, incremented at each dictionary creation and at each dictionary change. Implementation of the PEP 509.
This commit is contained in:
parent
70897ec54c
commit
3b6a6b4215
8 changed files with 243 additions and 4 deletions
|
|
@ -26,6 +26,10 @@ typedef struct {
|
|||
/* Number of items in the dictionary */
|
||||
Py_ssize_t ma_used;
|
||||
|
||||
/* Dictionary version: globally unique, value change each time
|
||||
the dictionary is modified */
|
||||
uint64_t ma_version_tag;
|
||||
|
||||
PyDictKeysObject *ma_keys;
|
||||
|
||||
/* If ma_values is NULL, the table is "combined": keys and values
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue