[Stackless] Finale (Re: PySide problem, take #2: typeobject clash)

Christian Tismer tismer at stackless.com
Mon Oct 28 04:56:00 CET 2013


today I found the final solution. Yay !-)
Very few lines of code, and binary compatible with CPython and Stackless.
That means you need not compile different versions if you switch to 

This was the end of a long journey, until I realized:

- PySide does not directly use any structure that stackless changes.

- the only problem is that PySide wants to extend PyType_Type, but stackless
    wants to do the same.


- turn stackless off in PySide, by defining STACKLESS_OFF

- add the needed padding to SbkObjectType

By definition, STACKLESS_OFF has the effect of producing vanilla CPython,
so it is not even needed to test more than one version. It _is_ already
a plain CPython extension, and if it runs on stackless, it also runs on 

End of a long journey...

... and I should better remember solutions which were prepared since a 
    Well, this use case of STACKLESS_OFF was in fact not known before.

cheers - Chris

Christian Tismer             :^)   <mailto:tismer at stackless.com>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/

More information about the Stackless mailing list