Antoine Pitrou added the comment: > (gdb) p *((PyWeakReference*)self)->wr_object > $9 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 0, ob_type = 0x0} > > If I am reading Py_TYPE right, Py_TYPE(self->wr_object) must be 0 > (=NULL).
Well, no, it should *always* be non-NULL (and it's a strong reference, so it should be a pointer to a valid PyTypeObject). There's nothing in the CPython source code which sets Py_TYPE(something) (i.e. something->ob_type) to NULL. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17922> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com