Skip to content

Commit b3a0d15

Browse files
[3.13] gh-142664: fix PyObject_Hash invokation post GH-143217 (GH-143223) (#143225)
gh-142664: fix `PyObject_Hash` invokation post GH-143217 (GH-143223) (cherry picked from commit 84fcdbd) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent 4fcb1d9 commit b3a0d15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/memoryobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3078,9 +3078,9 @@ memory_hash(PyObject *_self)
30783078
// Prevent 'self' from being freed when computing the item's hash.
30793079
// See https://github.com/python/cpython/issues/142664.
30803080
self->exports++;
3081-
int rc = PyObject_Hash(view->obj);
3081+
Py_hash_t h = PyObject_Hash(view->obj);
30823082
self->exports--;
3083-
if (rc == -1) {
3083+
if (h == -1) {
30843084
/* Keep the original error message */
30853085
return -1;
30863086
}

0 commit comments

Comments
 (0)