summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/classobject.c3
-rw-r--r--Objects/object.c6
2 files changed, 4 insertions, 5 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 9cca19f..00cfdde 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -516,8 +516,7 @@ instance_dealloc(register PyInstanceObject *inst)
extern long _Py_RefTotal;
#endif
- if (!PyObject_ClearWeakRefs((PyObject *) inst))
- return;
+ PyObject_ClearWeakRefs((PyObject *) inst);
/* Temporarily resurrect the object. */
#ifdef Py_TRACE_REFS
diff --git a/Objects/object.c b/Objects/object.c
index 8a898f8..db7d518 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1475,13 +1475,13 @@ PyObject_Free(void *p)
call site instead of requiring a test for NULL.
*/
-static int
+static void
empty_clear_weak_refs(PyObject *o)
{
- return 1;
+ return;
}
-int (*PyObject_ClearWeakRefs)(PyObject *) = empty_clear_weak_refs;
+void (*PyObject_ClearWeakRefs)(PyObject *) = empty_clear_weak_refs;