[Stackless] stackess for 2.7

Jeff Senn senn at maya.com
Thu Jul 1 18:08:54 CEST 2010


K-

Here are a few more tiny patches to clean up compile warnings you may not be seeing 
on windows.  The only one that actually changes behavior has to do with a 64 bit compile
issue (the sprintf in prickelpit below).  To make it compile (and be meaningful) 
on 32 and 64 bit with the smallest change, I got rid of the leading 0's in the informative
exception string value...  %016lx would be the next simplest, followed by (becoming
increasingly non-backward compatible and non-portable) %z or code to figure out the 
exact wordsize of the compile...
(Presumably none of this matters, because I suppose that string is only for human consumption)

Speaking of 64bit... are you compiling a 64bit version? I am having some trouble...
In particular test_cpickle crashes (segfault) in  test_issue2702 (__main__.cPickleDeepRecursive)


Index: Python/pythonrun.c
===================================================================
--- Python/pythonrun.c	(revision 82414)
+++ Python/pythonrun.c	(working copy)
@@ -1146,7 +1146,7 @@
 }
 
 #ifdef STACKLESS
-void PyStackless_HandleSystemExit()
+void PyStackless_HandleSystemExit(void)
 {
     handle_system_exit();
 }
Index: Stackless/pickling/prickelpit.c
===================================================================
--- Stackless/pickling/prickelpit.c	(revision 82414)
+++ Stackless/pickling/prickelpit.c	(working copy)
@@ -415,8 +415,8 @@
     if (exec_name == NULL) {
         char msg[500];
         PyErr_Clear();
-        sprintf(msg, "frame exec function at %08x is not registered!",
-            (unsigned int)(void *)f->f_execute);
+        sprintf(msg, "frame exec function at %lx is not registered!",
+            (unsigned long)(void *)f->f_execute);
         PyErr_SetString(PyExc_ValueError, msg);
         valid = 0;
     }
@@ -576,7 +576,7 @@
  */
 
 static PyTypeObject wrap_PyCell_Type;
-extern PyTypeObject *_Pywrap_PyCell_Type = &wrap_PyCell_Type;
+PyTypeObject *_Pywrap_PyCell_Type = &wrap_PyCell_Type;
 
 static PyObject *
 cell_reduce(PyCellObject *cell)
Index: Stackless/module/stacklessmodule.c
===================================================================
--- Stackless/module/stacklessmodule.c	(revision 82414)
+++ Stackless/module/stacklessmodule.c	(working copy)
@@ -1122,7 +1122,7 @@
     return 0;
 }
 
-static int init_stackless_methods()
+static int init_stackless_methods(void)
 {
     _stackless_method *p = _stackless_methtable;
 


On Jun 30, 2010, at 5:28 AM, Kristján Valur Jónsson wrote:

> Jeff, please commit those changes to setup.py and descrobject.c.
> I was not able to confirm line ending differences in Lib/*.
> It is probably due to me being on windows, and svn doing some line ending magic for me.  If you could fix it on unix, that would be great.
> K
> ...
>> 




More information about the Stackless mailing list