Skip to content

Commit 87027da

Browse files
committed
gh-142664: fix PyObject_Hash invokation post GH-143217
1 parent 3a728e5 commit 87027da

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

0 commit comments

Comments
 (0)