diff Include/setobject.h @ 64116:ee3dcdfe2f87

Issue #9612: The set object is now 64-bit clean under Windows.
author Antoine Pitrou <solipsis@pitrou.net>
date Tue, 17 Aug 2010 17:55:07 +0000
parents cab14be0ada1
children e8969fb822fc
line wrap: on
line diff
--- a/Include/setobject.h	Tue Aug 17 17:52:02 2010 +0000
+++ b/Include/setobject.h	Tue Aug 17 17:55:07 2010 +0000
@@ -22,7 +22,11 @@
 #define PySet_MINSIZE 8
 
 typedef struct {
-    long hash;      /* cached hash code for the entry key */
+    /* Cached hash code of the key.  Note that hash codes are C longs.
+     * We have to use Py_ssize_t instead because set_pop() abuses
+     * the hash field to hold a search finger.
+     */
+    Py_ssize_t hash;
     PyObject *key;
 } setentry;