mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
The return value from PyObject_ClearWeakRefs() is no longer meaningful,
so make it void.
This commit is contained in:
parent
4f9b13bac8
commit
b60654bc15
4 changed files with 8 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue