mirror of
https://github.com/wassname/ray.git
synced 2026-07-17 11:32:33 +08:00
Properly decrement Python reference count in PyObjectID_hash. (#429)
This commit is contained in:
committed by
Philipp Moritz
parent
feff561ca1
commit
8c6d3a88a9
+3
-1
@@ -81,7 +81,9 @@ static long PyObjectID_hash(PyObject* a) {
|
||||
PyObjectID* A = (PyObjectID*) a;
|
||||
PyObject* tuple = PyTuple_New(1);
|
||||
PyTuple_SetItem(tuple, 0, PyInt_FromLong(A->id));
|
||||
return PyObject_Hash(tuple);
|
||||
long hash = PyObject_Hash(tuple);
|
||||
Py_XDECREF(tuple);
|
||||
return hash;
|
||||
}
|
||||
|
||||
char RAY_ID_LITERAL[] = "id";
|
||||
|
||||
Reference in New Issue
Block a user