File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ extern DL_IMPORT(int) PyCallable_Check(PyObject *);
284284extern DL_IMPORT (int ) PyNumber_Coerce (PyObject * * , PyObject * * );
285285extern DL_IMPORT (int ) PyNumber_CoerceEx (PyObject * * , PyObject * * );
286286
287- extern DL_IMPORT (int ) (* PyObject_ClearWeakRefs )(PyObject * );
287+ extern DL_IMPORT (void ) (* PyObject_ClearWeakRefs )(PyObject * );
288288
289289/* Helpers for printing recursive container types */
290290extern DL_IMPORT (int ) Py_ReprEnter (PyObject * );
Original file line number Diff line number Diff line change @@ -692,7 +692,7 @@ weakref_proxy(PyObject *self, PyObject *args)
692692 * until one resurrects the object, at which point it stops invalidating
693693 * weak references and returns false.
694694 */
695- static int
695+ static
696696cleanup_helper (PyObject * object )
697697{
698698 PyWeakReference * * list ;
@@ -702,7 +702,7 @@ cleanup_helper(PyObject *object)
702702 || object -> ob_refcnt != 0 ) {
703703 PyErr_BadInternalCall ();
704704 /* not sure what we should return here */
705- return 1 ;
705+ return ;
706706 }
707707 list = GET_WEAKREFS_LISTPTR (object );
708708 while (* list != NULL ) {
@@ -722,7 +722,7 @@ cleanup_helper(PyObject *object)
722722 Py_DECREF (callback );
723723 }
724724 }
725- return ( object -> ob_refcnt > 0 ? 0 : 1 ) ;
725+ return ;
726726}
727727
728728
Original file line number Diff line number Diff line change @@ -516,8 +516,7 @@ instance_dealloc(register PyInstanceObject *inst)
516516 extern long _Py_RefTotal ;
517517#endif
518518
519- if (!PyObject_ClearWeakRefs ((PyObject * ) inst ))
520- return ;
519+ PyObject_ClearWeakRefs ((PyObject * ) inst );
521520
522521 /* Temporarily resurrect the object. */
523522#ifdef Py_TRACE_REFS
Original file line number Diff line number Diff line change @@ -1475,13 +1475,13 @@ PyObject_Free(void *p)
14751475 call site instead of requiring a test for NULL.
14761476*/
14771477
1478- static int
1478+ static void
14791479empty_clear_weak_refs (PyObject * o )
14801480{
1481- return 1 ;
1481+ return ;
14821482}
14831483
1484- int (* PyObject_ClearWeakRefs )(PyObject * ) = empty_clear_weak_refs ;
1484+ void (* PyObject_ClearWeakRefs )(PyObject * ) = empty_clear_weak_refs ;
14851485
14861486
14871487
You can’t perform that action at this time.
0 commit comments