+++ "b/c:\\sip-4.10-snapshot-20091223\\siplib\\siplib.c"
@@ -617,11 +617,15 @@ PyMODINIT_FUNC SIP_MODULE_ENTRY(void)
     if (sip_api_register_py_type((PyTypeObject *)&sipSimpleWrapper_Type) <
0)
         SIP_FATAL("sip: Failed to register sip.simplewrapper type");

+#if defined(STACKLESS)
+       sipWrapper_Type.super.tp_base = (PyTypeObject
*)&sipSimpleWrapper_Type;
+#else
 #if PY_VERSION_HEX >= 0x02050000
     sipWrapper_Type.super.ht_type.tp_base = (PyTypeObject
*)&sipSimpleWrapper_Type;
 #else
     sipWrapper_Type.super.type.tp_base = (PyTypeObject
*)&sipSimpleWrapper_Type;
 #endif
+#endif

This is more like a small hack, but basically under MSVC8 I get this
compiler error:

siplib.c
.\siplib.c(621) : error C2039: 'ht_type' : is not a member of '_typeobject'
        c:\python26\include\object.h(325) : see declaration of '_typeobject'

Changing to sipWrapper_Type.super.tp_base allows me to compile and it seems
to work since it's using the same pointer type. I'm sure it could be done
slightly cleaner, but so far this seems to work for me.

-- 
View this message in context: 
http://old.nabble.com/Small-patch-to-compile-sip-with-stackless-2.6.4-tp26938106p26938106.html
Sent from the PyQt mailing list archive at Nabble.com.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to