summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-08 19:51:24 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-08 19:51:24 (GMT)
commit3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591 (patch)
treeea9d0eb92290e7565280d82bb1e2f92f5a38fb83 /Include
parent70897ec54c824bc66ae15678e0dc8da144227582 (diff)
downloadcpython-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.h4
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