diff options
author | Raymond Hettinger <python@rcn.com> | 2015-01-18 21:12:42 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-01-18 21:12:42 (GMT) |
commit | 1202a4733e6ffbf3149425aae14f7c4eeeb115c0 (patch) | |
tree | d0c2393c496b6df4b26ab1ee8606dcc70b8578f1 /Include/setobject.h | |
parent | a556af77a7853cf198011eaa5a3258751d72853f (diff) | |
download | cpython-1202a4733e6ffbf3149425aae14f7c4eeeb115c0.zip cpython-1202a4733e6ffbf3149425aae14f7c4eeeb115c0.tar.gz cpython-1202a4733e6ffbf3149425aae14f7c4eeeb115c0.tar.bz2 |
Issue 23261: Clean-up the hack to store the set.pop() search finger in a hash field instead of the setobject.
Diffstat (limited to 'Include/setobject.h')
-rw-r--r-- | Include/setobject.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Include/setobject.h b/Include/setobject.h index 8f8e34f..79124d0 100644 --- a/Include/setobject.h +++ b/Include/setobject.h @@ -14,9 +14,7 @@ extern "C" { 2. Active: key != NULL and key != dummy 3. Dummy: key == dummy -Note: .pop() abuses the hash field of an Unused or Dummy slot to -hold a search finger. The hash field of Unused or Dummy slots has -no meaning otherwise. +The hash field of Unused or Dummy slots have no meaning. */ #define PySet_MINSIZE 8 @@ -59,6 +57,7 @@ typedef struct _setobject { Py_hash_t hash; /* Only used by frozenset objects */ setentry smalltable[PySet_MINSIZE]; + Py_ssize_t finger; /* Search finger for pop() */ PyObject *weakreflist; /* List of weak references */ } PySetObject; |