[PyQt] Compiling SIP with stackless python

Michael Guntsche mike at it-loops.com
Sat Sep 1 12:14:51 BST 2007


Hello Phil,

The following patch (taken from the stackless mailing list) makes SIP  
work with stackless python.
Is it possible to add this code with an #ifndef STACKLESS to stock  
SIP since I tend to forget to add it, when compiling a new snapshot. :)
This has been tested on Macosx 10.4.10 with python 2.5.1.

Kind regards,
Michael

--- siplib/siplib.c.orig	2007-09-01 13:10:19.000000000 +0200
+++ siplib/siplib.c	2007-09-01 13:12:33.000000000 +0200
@@ -7189,6 +7189,9 @@
   * assumptions about which Python will choose.
   */
static sipWrapperType sipWrapper_Type = {
+    #ifndef STACKLESS
+    {
+    #endif
          {
              PyObject_HEAD_INIT(&sipWrapperType_Type)
              0,              /* ob_size */
@@ -7231,6 +7234,9 @@
              (newfunc)sipWrapper_new,    /* tp_new */
              0,              /* tp_free */
          },
+    #ifndef STACKLESS
+    },
+    #endif
      0,
      0
};



More information about the PyQt mailing list