summaryrefslogtreecommitdiffstats
path: root/Modules/_weakref.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_weakref.c')
-rw-r--r--Modules/_weakref.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_weakref.c b/Modules/_weakref.c
index a856901..502d568 100644
--- a/Modules/_weakref.c
+++ b/Modules/_weakref.c
@@ -692,7 +692,7 @@ weakref_proxy(PyObject *self, PyObject *args)
* until one resurrects the object, at which point it stops invalidating
* weak references and returns false.
*/
-static int
+static
cleanup_helper(PyObject *object)
{
PyWeakReference **list;
@@ -702,7 +702,7 @@ cleanup_helper(PyObject *object)
|| object->ob_refcnt != 0) {
PyErr_BadInternalCall();
/* not sure what we should return here */
- return 1;
+ return;
}
list = GET_WEAKREFS_LISTPTR(object);
while (*list != NULL) {
@@ -722,7 +722,7 @@ cleanup_helper(PyObject *object)
Py_DECREF(callback);
}
}
- return (object->ob_refcnt > 0 ? 0 : 1);
+ return;
}