[Pyrex] Weakrefs

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Dec 2 23:52:43 UTC 2006


Chris Perkins wrote:

> According to this:
> http://effbot.org/lib/weakref.html#weak-references-in-extension-types
> there are 5 things that need to be done to make an extension type
> weak-referenceable:

It's quite likely that I haven't done it right. Weak
reference support was only added recently and hasn't
been tested very well yet. I'll look into it.

> 4) add Py_TPFLAGS_HAVE_WEAKREFS to the tp_flags slot

Looking at object.h in the Python 2.3 distribution, it
seems that Py_TPFLAGS_DEFAULT already includes
Py_TPFLAGS_HAVE_WEAKREFS, which makes me think that
this list of requirements is not quite up to date.

Does anyone know more about what the requirements for
weakref support really are in 2.3 and later?

--
Greg



More information about the Pyrex mailing list