[Stackless] Fwd: Re: Compiling stackless with PyQt4?
Richard Tew
richard.m.tew at gmail.com
Sun Apr 1 10:59:06 CEST 2007
On 3/31/07, Hieu Hoang <hieu.d.hoang at gmail.com> wrote:
> Also I have a crash case, with both trunk and 25-maint
>
> >>>import sip
> >>>sip.wrapper
>
> All other stuffs in dir(sip) can be invoked no problem.
Right. I reproduced this on my linux box. This is an incompatibility
with how Stackless does away with the PyHeapTypeObject except as a
define for PyTypeObject. If the initialisation in siplib.c is
corrected to match the way Stackless is doing this, then this crash
will go away and I expect PyQT built on a "corrected for Stackless"
sip will also work. It would be good if someone could confirm that.
I do not have a fix for Stackless at this time.
Change the following in siplib.c:
static sipWrapperType sipWrapper_Type = {
{
{
PyObject_HEAD_INIT(&sipWrapperType_Type)
0, /* ob_size */
"sip.wrapper", /* tp_name */
sizeof (sipWrapper), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)sipWrapper_dealloc, /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
sipWrapper_getattro, /* tp_getattro */
sipWrapper_setattro, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
Py_TPFLAGS_HAVE_GC, /* tp_flags */
0, /* tp_doc */
(traverseproc)sipWrapper_traverse, /* tp_traverse */
(inquiry)sipWrapper_clear, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
offsetof(sipWrapper,dict), /* tp_dictoffset */
(initproc)sipWrapper_init, /* tp_init */
0, /* tp_alloc */
(newfunc)sipWrapper_new, /* tp_new */
0, /* tp_free */
},
},
0,
0
};
To:
static sipWrapperType sipWrapper_Type = {
{
PyObject_HEAD_INIT(&sipWrapperType_Type)
0, /* ob_size */
"sip.wrapper", /* tp_name */
sizeof (sipWrapper), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)sipWrapper_dealloc, /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
sipWrapper_getattro, /* tp_getattro */
sipWrapper_setattro, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
Py_TPFLAGS_HAVE_GC, /* tp_flags */
0, /* tp_doc */
(traverseproc)sipWrapper_traverse, /* tp_traverse */
(inquiry)sipWrapper_clear, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
0, /* tp_descr_set */
offsetof(sipWrapper,dict), /* tp_dictoffset */
(initproc)sipWrapper_init, /* tp_init */
0, /* tp_alloc */
(newfunc)sipWrapper_new, /* tp_new */
0, /* tp_free */
},
0,
0
};
Richard.
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list