On 22.10.13 16:24, John Ehresman wrote:
On 21.10.13 22:10, John Ehresman wrote:

I think I see the problem; to me, at least, it's useful to see the
stackless version of object.h at
http://www.stackless.com/browser/Include/object.h  It looks like
stackless moves the fields defined in PyHeapTypeObject into
PyTypeObject, adds at least one additional field, and then #define's
PyHeapTypeObject to PyTypeObject.  This leads to two problems, which
are somewhat separable --

1) When compiling, there is no ht_type field in PyHeapTypeObject. This
is what Christian's patch addresses.

Wouldn't it be possible to use something like the following in shiboken's basewrapper.h (untested code below):

/// PyTypeObject extended with C++ multiple inheritance information.
#ifndef STACKLESS

struct LIBSHIBOKEN_API SbkObjectType
{
    PyHeapTypeObject super;
    SbkObjectTypePrivate* d;
};

#else // STACKLESS

// Work around stackless's modification of PyTypeObject and PyHeapTypeObject
struct LIBSHIBOKEN_API SbkObjectType
{
    struct {
        PyTypeObject ht_type;
    } super;
    SbkObjectTypePrivate* d;
};

#endif

This would have the advantage of not sprinkling macros across the code base. It does not address the binary compatibility problem.

Hmm, good idea!
That would really be a minimal patch with much less ugliness and clutter.
Well, not sure yet if I want to try that really right now...maybe

ciao - chris

--
Christian Tismer             :^)   <mailto:[email protected]>
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/


_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to