On Mon, 04 Oct 2010 23:30:58 +0200 "Jonas H." <jo...@lophus.org> wrote: > > > [...] here's a minimal, but __complete__, module that defines a new type: > > > > [...] > > static PyTypeObject noddy_NoddyType = { > > [...] > > 0, /*tp_dealloc*/ > > [...] > > }; > > So I thought "complete" meant "it works". Actually, DECREFing that an > object of *that* type does not work, it crashes because of the NULL > `tp_dealloc` function pointer that is called in `_Py_Dealloc`.
Well, it should work, but you have to call PyType_Ready() to fill in the NULL fields with default values (for those where it's necessary). Does it solve it for you? Regards Antoine. -- http://mail.python.org/mailman/listinfo/python-list