summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-03-22 18:19:10 (GMT)
committerGitHub <noreply@github.com>2024-03-22 18:19:10 (GMT)
commite2e0b4b4b92694ba894e02b4a66fd87c166ed10f (patch)
tree5ed883afb7db70957444e4df8adca74af54eef17 /Objects/typeobject.c
parent567ab3bd15398c8c7b791f3e376ae3e3c0bbe079 (diff)
downloadcpython-e2e0b4b4b92694ba894e02b4a66fd87c166ed10f.zip
cpython-e2e0b4b4b92694ba894e02b4a66fd87c166ed10f.tar.gz
cpython-e2e0b4b4b92694ba894e02b4a66fd87c166ed10f.tar.bz2
gh-113024: C API: Add PyObject_GenericHash() function (GH-113025)
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 06c2fc8..8282278 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6891,12 +6891,6 @@ PyDoc_STRVAR(object_doc,
"When called, it accepts no arguments and returns a new featureless\n"
"instance that has no instance attributes and cannot be given any.\n");
-static Py_hash_t
-object_hash(PyObject *obj)
-{
- return _Py_HashPointer(obj);
-}
-
PyTypeObject PyBaseObject_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"object", /* tp_name */
@@ -6911,7 +6905,7 @@ PyTypeObject PyBaseObject_Type = {
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
- object_hash, /* tp_hash */
+ PyObject_GenericHash, /* tp_hash */
0, /* tp_call */
object_str, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */