diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c index e78f5d110a457f..2d6c33b2ac1cde 100644 --- a/Objects/memoryobject.c +++ b/Objects/memoryobject.c @@ -3232,9 +3232,9 @@ memory_hash(PyObject *_self) // Prevent 'self' from being freed when computing the item's hash. // See https://github.com/python/cpython/issues/142664. self->exports++; - int rc = PyObject_Hash(view->obj); + Py_hash_t h = PyObject_Hash(view->obj); self->exports--; - if (rc == -1) { + if (h == -1) { /* Keep the original error message */ return -1; }