Antoine Pitrou <pit...@free.fr> added the comment: > Doing it after Py_CLEAR(self->mbuf) seems to contradict > > > http://docs.python.org/dev/extending/newtypes.html?highlight=pyobject_clearweakrefs#weak-reference-support > > which says > > The only further addition is that the destructor needs to call the weak > reference manager to clear any weak references. This should be done > *before* > any other parts of the destruction have occurred, but is only required if > the > weak reference list is non-NULL:
Mmh, this seems to be misled. The original formulation is from SVN r16381; the clearly erroneous part about resurrecting objects was later removed in r18223, but the rest is probably unnecessary as well. I'll open a separate issue. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14930> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com