diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-08 19:51:24 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-08 19:51:24 (GMT) |
commit | 3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591 (patch) | |
tree | ea9d0eb92290e7565280d82bb1e2f92f5a38fb83 /Include | |
parent | 70897ec54c824bc66ae15678e0dc8da144227582 (diff) | |
download | cpython-3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591.zip cpython-3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591.tar.gz cpython-3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591.tar.bz2 |
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.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/dictobject.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h index 02d40ff..19194ed 100644 --- a/Include/dictobject.h +++ b/Include/dictobject.h @@ -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 |