diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-10-17 20:13:05 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-10-17 20:13:05 +0000 |
commit | 6c3703bb3f3e516ca8e6bb086c122bd937d66b6c (patch) | |
tree | 289d1d6faf357debcd3e88c6259f85f19419b6de /Objects/sliceobject.c | |
parent | d8e0f23592753101f1702f0a78e3a74d2f523356 (diff) | |
download | cpython-6c3703bb3f3e516ca8e6bb086c122bd937d66b6c.tar.gz |
use helper hash unimplemented function
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r-- | Objects/sliceobject.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c index 55fda52987..b617891423 100644 --- a/Objects/sliceobject.c +++ b/Objects/sliceobject.c @@ -344,13 +344,6 @@ slice_richcompare(PyObject *v, PyObject *w, int op) 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 @@ PyTypeObject PySlice_Type = { 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 */ |