mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03: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
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue