[Python-checkins] r85669 - python/branches/py3k/Objects/typeobject.c

benjamin.peterson python-checkins at python.org
Sun Oct 17 23:27:01 CEST 2010


Author: benjamin.peterson
Date: Sun Oct 17 23:27:01 2010
New Revision: 85669

Log:
-1 is reserved for errors

Modified:
   python/branches/py3k/Objects/typeobject.c

Modified: python/branches/py3k/Objects/typeobject.c
==============================================================================
--- python/branches/py3k/Objects/typeobject.c	(original)
+++ python/branches/py3k/Objects/typeobject.c	Sun Oct 17 23:27:01 2010
@@ -4959,6 +4959,9 @@
         PyErr_Clear();
         h = PyLong_Type.tp_hash(res);
     }
+    /* -1 is reserved for errors. */
+    if (h == -1)
+        h = -2;
     Py_DECREF(res);
     return h;
 }


More information about the Python-checkins mailing list