Kaydet (Commit) c8fe77bd authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Use identity instead of equality when looking for referrers. Fixes #485781.

üst 1cec7fab
...@@ -650,9 +650,10 @@ gc_get_thresh(PyObject *self, PyObject *args) ...@@ -650,9 +650,10 @@ gc_get_thresh(PyObject *self, PyObject *args)
static int static int
referrersvisit(PyObject* obj, PyObject *objs) referrersvisit(PyObject* obj, PyObject *objs)
{ {
if (PySequence_Contains(objs, obj)) { int i;
return 1; for (i = 0; i < PyTuple_GET_SIZE(objs); i++)
} if (PyTuple_GET_ITEM(objs, i) == obj)
return 1;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment