summaryrefslogtreecommitdiff
path: root/Include/setobject.h
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2015-01-26 21:54:35 -0800
committerRaymond Hettinger <python@rcn.com>2015-01-26 21:54:35 -0800
commita5ebbf6295fef4e9033774f5c711a53407d766c9 (patch)
treee1739e041ca98f6d0b3e6e8ffcf7a577eb3a1580 /Include/setobject.h
parent3037e84ad14424759298966579dbcce77a212621 (diff)
downloadcpython-git-a5ebbf6295fef4e9033774f5c711a53407d766c9.tar.gz
Remove unneeded dummy test from the set search loop (when the hashes match we know the key is not a dummy).
Diffstat (limited to 'Include/setobject.h')
-rw-r--r--Include/setobject.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Include/setobject.h b/Include/setobject.h
index a8b8d33ebb..bb5316f6d2 100644
--- a/Include/setobject.h
+++ b/Include/setobject.h
@@ -14,7 +14,10 @@ extern "C" {
2. Active: key != NULL and key != dummy
3. Dummy: key == dummy
-The hash field of Unused or Dummy slots have no meaning.
+The hash field of Unused slots have no meaning.
+The hash field of Dummny slots are set to -1
+meaning that dummy entries can be detected by
+either entry->key==dummy or by entry->hash==-1.
*/
#define PySet_MINSIZE 8