diff options
Diffstat (limited to 'contrib/tools/python3/Objects/picklebufobject.c')
| -rw-r--r-- | contrib/tools/python3/Objects/picklebufobject.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/tools/python3/Objects/picklebufobject.c b/contrib/tools/python3/Objects/picklebufobject.c index aaa852cfbb0..0de5245585e 100644 --- a/contrib/tools/python3/Objects/picklebufobject.c +++ b/contrib/tools/python3/Objects/picklebufobject.c @@ -1,7 +1,7 @@ /* PickleBuffer object implementation */ -#define PY_SSIZE_T_CLEAN #include "Python.h" +#include "pycore_weakref.h" // FT_CLEAR_WEAKREFS() #include <stddef.h> typedef struct { @@ -109,8 +109,7 @@ static void picklebuf_dealloc(PyPickleBufferObject *self) { PyObject_GC_UnTrack(self); - if (self->weakreflist != NULL) - PyObject_ClearWeakRefs((PyObject *) self); + FT_CLEAR_WEAKREFS((PyObject*)self, self->weakreflist); PyBuffer_Release(&self->view); Py_TYPE(self)->tp_free((PyObject *) self); } |
