summaryrefslogtreecommitdiff
path: root/Include/setobject.h
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-01-18 13:12:42 -0800
committerRaymond Hettinger <python@rcn.com>2015-01-18 13:12:42 -0800
commit1202a4733e6ffbf3149425aae14f7c4eeeb115c0 (patch)
treed0c2393c496b6df4b26ab1ee8606dcc70b8578f1 /Include/setobject.h
parenta556af77a7853cf198011eaa5a3258751d72853f (diff)
downloadcpython-git-1202a4733e6ffbf3149425aae14f7c4eeeb115c0.tar.gz
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.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Include/setobject.h b/Include/setobject.h
index 8f8e34f254..79124d0f6e 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;