Skip to content

Commit 921b8b7

Browse files
picnixzmiss-islington
authored andcommitted
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 93029e4 commit 921b8b7

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
@@ -3232,9 +3232,9 @@ memory_hash(PyObject *_self)
32323232
// Prevent 'self' from being freed when computing the item's hash.
32333233
// See https://github.com/python/cpython/issues/142664.
32343234
self->exports++;
3235-
int rc = PyObject_Hash(view->obj);
3235+
Py_hash_t h = PyObject_Hash(view->obj);
32363236
self->exports--;
3237-
if (rc == -1) {
3237+
if (h == -1) {
32383238
/* Keep the original error message */
32393239
return -1;
32403240
}

0 commit comments

Comments
 (0)