[Stackless] SIP wrapper compilation problems under stackless

Richard Tew richard.m.tew at gmail.com
Sat Mar 31 12:31:08 CEST 2007


On 1/3/07, Carlos Eduardo de Paula <cedepaula at yahoo.com.br> wrote:
> I currently using Stackless Python(www.stackless.com in a small application
> i´m developing integrated with Qt and PyQT,  I got some problems trying to compile SIP, the C library wrapper used by PyQt.
>
> When compiling SIP with Microsoft Visual C++ 2003 .NET I got the
> following error:
>
..
> .\siplib.c(6570) : error C2078: too many initializers

The problem here is that SIP uses PyHeapTypeObject in defining its own
type and then accounts for PyHeapTypeObject existing when it
initialises that type.  I would say this is a bug created by Stackless
defining PyHeapTypeObject to be PyTypeObject.

Carlos, remove the nested level of parentheses which encapsulate
PyHeapTypeObject initialisation and it should compile fine.  But keep
the ones which encapsulate PyTypeObject initialisation, otherwise you
are just initialising PyTypeObject fields rather than the additional
fields the sip type adds.

The strange thing is that people have been able to compile sip against
Stackless regardless of this.  So perhaps this might be the cause of
the crashes.. incorrect initialisation of the sip types.

Richard.

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list