[Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.197,2.198 socketmodule.c,1.167,1.168
Tim Peters
tim_one@users.sourceforge.net
Wed, 29 Aug 2001 14:37:12 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv23991/Modules
Modified Files:
posixmodule.c socketmodule.c
Log Message:
SF bug [#456252] Python should never stomp on [u]intptr_t.
pyport.h: typedef a new Py_intptr_t type.
DELICATE ASSUMPTION: That HAVE_UINTPTR_T implies intptr_t is
available as well as uintptr_t. If that turns out not to be
true, things must get uglier (C99 wants both, so I think it's
an assumption we're *likely* to get away with).
thread_nt.h, PyThread_start_new_thread: MS _beginthread is documented
as returning unsigned long; no idea why uintptr_t was being used.
Others: Always use Py_[u]intptr_t, never [u]intptr_t directly.
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.197
retrieving revision 2.198
diff -C2 -d -r2.197 -r2.198
*** posixmodule.c 2001/08/27 06:37:48 2.197
--- posixmodule.c 2001/08/29 21:37:09 2.198
***************
*** 1552,1556 ****
char **argvlist;
int mode, i, argc;
! intptr_t spawnval;
PyObject *(*getitem)(PyObject *, int);
--- 1552,1556 ----
char **argvlist;
int mode, i, argc;
! Py_intptr_t spawnval;
PyObject *(*getitem)(PyObject *, int);
***************
*** 1621,1625 ****
PyObject *key, *val, *keys=NULL, *vals=NULL, *res=NULL;
int mode, i, pos, argc, envc;
! intptr_t spawnval;
PyObject *(*getitem)(PyObject *, int);
--- 1621,1625 ----
PyObject *key, *val, *keys=NULL, *vals=NULL, *res=NULL;
int mode, i, pos, argc, envc;
! Py_intptr_t spawnval;
PyObject *(*getitem)(PyObject *, int);
***************
*** 3690,3695 ****
if (!ok)
return win32_error("CreatePipe", NULL);
! read_fd = _open_osfhandle((intptr_t)read, 0);
! write_fd = _open_osfhandle((intptr_t)write, 1);
return Py_BuildValue("(ii)", read_fd, write_fd);
#endif /* MS_WIN32 */
--- 3690,3695 ----
if (!ok)
return win32_error("CreatePipe", NULL);
! read_fd = _open_osfhandle((Py_intptr_t)read, 0);
! write_fd = _open_osfhandle((Py_intptr_t)write, 1);
return Py_BuildValue("(ii)", read_fd, write_fd);
#endif /* MS_WIN32 */
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -C2 -d -r1.167 -r1.168
*** socketmodule.c 2001/08/20 22:26:24 1.167
--- socketmodule.c 2001/08/29 21:37:09 1.168
***************
*** 1424,1428 ****
int bufsize = -1;
#ifdef MS_WIN32
! intptr_t fd;
#else
int fd;
--- 1424,1428 ----
int bufsize = -1;
#ifdef MS_WIN32
! Py_intptr_t fd;
#else
int fd;