[Python-checkins] r85661 - python/branches/py3k/Objects/sliceobject.c

benjamin.peterson python-checkins at python.org
Sun Oct 17 22:13:06 CEST 2010


Author: benjamin.peterson
Date: Sun Oct 17 22:13:05 2010
New Revision: 85661

Log:
use helper hash unimplemented function

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

Modified: python/branches/py3k/Objects/sliceobject.c
==============================================================================
--- python/branches/py3k/Objects/sliceobject.c	(original)
+++ python/branches/py3k/Objects/sliceobject.c	Sun Oct 17 22:13:05 2010
@@ -344,13 +344,6 @@
     return res;
 }
 
-static long
-slice_hash(PySliceObject *v)
-{
-    PyErr_SetString(PyExc_TypeError, "unhashable type");
-    return -1L;
-}
-
 PyTypeObject PySlice_Type = {
     PyVarObject_HEAD_INIT(&PyType_Type, 0)
     "slice",                    /* Name of this type */
@@ -365,7 +358,7 @@
     0,                                          /* tp_as_number */
     0,                                          /* tp_as_sequence */
     0,                                          /* tp_as_mapping */
-    (hashfunc)slice_hash,                       /* tp_hash */
+    PyObject_HashNotImplemented,                /* tp_hash */
     0,                                          /* tp_call */
     0,                                          /* tp_str */
     PyObject_GenericGetAttr,                    /* tp_getattro */


More information about the Python-checkins mailing list