Raymond Hettinger <[email protected]> added the comment:
I'm thinking that edit to tp_dealloc was incorrect. The PyClear call should have been replaced (not removed) with the pattern shown in the C APIs docs ( https://docs.python.org/3/extending/newtypes.html?highlight=pyobject_clearw#weak-reference-support ): if (self->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) self); ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue39778> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
