7 Jun
2008
7 Jun
'08
2:14 a.m.
On Fri, Jun 6, 2008 at 1:40 PM, Laurent Gautier lgautier@gmail.com wrote:
I have probably found the problem. I report it here in case someone has the same issue later.
In my tp_new I had:
PyObject_New(MyType, type);
(and it was working just fine until I started with subclasses)
while it seems that it should have been:
type->tp_alloc(type, 0);
Do you have Py_TPFLAGS_HAVE_GC set? That'd require you to use PyObject_GC_New, which'd allocate extra space for the tracking flag, and the absence of which would explain the crash.
-- Adam Olsen, aka Rhamphoryncus