diff Include/setobject.h @ 64121:2a4ceebdfcfb 3.1

Merged revisions 84146-84147,84150 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84146 | antoine.pitrou | 2010-08-17 19:55:07 +0200 (mar., 17 août 2010) | 4 lines Issue #9612: The set object is now 64-bit clean under Windows. ........ r84147 | antoine.pitrou | 2010-08-17 20:30:06 +0200 (mar., 17 août 2010) | 3 lines Fix <deque iterator>.__length_hint__() under 64-bit Windows. ........ r84150 | antoine.pitrou | 2010-08-17 21:33:30 +0200 (mar., 17 août 2010) | 3 lines Clean some 64-bit issues. Also, always spell "ssize_t" "Py_ssize_t". ........
author Antoine Pitrou <solipsis@pitrou.net>
date Tue, 17 Aug 2010 19:39:39 +0000
parents f197407bdba2
children e8969fb822fc
line wrap: on
line diff
--- a/Include/setobject.h	Tue Aug 17 08:41:48 2010 +0000
+++ b/Include/setobject.h	Tue Aug 17 19:39:39 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;