[Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.143,2.144
Fredrik Lundh
python-dev@python.org
Sun, 9 Jul 2000 06:10:48 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv27646/Modules
Modified Files:
posixmodule.c
Log Message:
- fixed pointer size test in spawn functions. also added
cast to make sure Py_BuildValue gets the right thing.
this change eliminates bogus return codes from successful
spawn calls (e.g. 2167387144924954624 instead of 0).
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.143
retrieving revision 2.144
diff -C2 -r2.143 -r2.144
*** posixmodule.c 2000年07月08日 22:48:53 2.143
--- posixmodule.c 2000年07月09日 13:10:40 2.144
***************
*** 1541,1548 ****
return posix_error();
else
! #if SIZEOF_LONG == SIZE_VOID_P
! return Py_BuildValue("l", spawnval);
#else
! return Py_BuildValue("L", spawnval);
#endif
}
--- 1541,1548 ----
return posix_error();
else
! #if SIZEOF_LONG == SIZEOF_VOID_P
! return Py_BuildValue("l", (long) spawnval);
#else
! return Py_BuildValue("L", (LONG_LONG) spawnval);
#endif
}
***************
*** 1649,1656 ****
(void) posix_error();
else
! #if SIZEOF_LONG == SIZE_VOID_P
! res = Py_BuildValue("l", spawnval);
#else
! res = Py_BuildValue("L", spawnval);
#endif
--- 1649,1656 ----
(void) posix_error();
else
! #if SIZEOF_LONG == SIZEOF_VOID_P
! res = Py_BuildValue("l", (long) spawnval);
#else
! res = Py_BuildValue("L", (LONG_LONG) spawnval);
#endif