mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Fix and test for an infinite C recursion.
This commit is contained in:
parent
98c048041d
commit
51fc8c456e
2 changed files with 5 additions and 1 deletions
|
|
@ -4560,7 +4560,7 @@ slot_tp_hash(PyObject *self)
|
|||
if (res == NULL)
|
||||
return -1;
|
||||
if (PyLong_Check(res))
|
||||
h = res->ob_type->tp_hash(res);
|
||||
h = PyLong_Type.tp_hash(res);
|
||||
else
|
||||
h = PyInt_AsLong(res);
|
||||
Py_DECREF(res);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue