diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-08-29 21:37:10 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-08-29 21:37:10 (GMT) |
commit | 79248aa1e4a8f6510b1f0ef95dc9592d51e16d6c (patch) | |
tree | 8bdd40a12e1a9c279a7cd0741333a4a1e00c2bf6 /Modules | |
parent | 1936745668f44dd121b50fef31a70efc07cc4ebf (diff) | |
download | cpython-79248aa1e4a8f6510b1f0ef95dc9592d51e16d6c.zip cpython-79248aa1e4a8f6510b1f0ef95dc9592d51e16d6c.tar.gz cpython-79248aa1e4a8f6510b1f0ef95dc9592d51e16d6c.tar.bz2 |
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.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 8 | ||||
-rw-r--r-- | Modules/socketmodule.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index c1ec84a..5f6f21d 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1551,7 +1551,7 @@ posix_spawnv(PyObject *self, PyObject *args) PyObject *argv; char **argvlist; int mode, i, argc; - intptr_t spawnval; + Py_intptr_t spawnval; PyObject *(*getitem)(PyObject *, int); /* spawnv has three arguments: (mode, path, argv), where @@ -1620,7 +1620,7 @@ posix_spawnve(PyObject *self, PyObject *args) char **envlist; PyObject *key, *val, *keys=NULL, *vals=NULL, *res=NULL; int mode, i, pos, argc, envc; - intptr_t spawnval; + Py_intptr_t spawnval; PyObject *(*getitem)(PyObject *, int); /* spawnve has four arguments: (mode, path, argv, env), where @@ -3689,8 +3689,8 @@ posix_pipe(PyObject *self, PyObject *args) Py_END_ALLOW_THREADS if (!ok) return win32_error("CreatePipe", NULL); - read_fd = _open_osfhandle((intptr_t)read, 0); - write_fd = _open_osfhandle((intptr_t)write, 1); + 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 */ #endif diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 46ca35f..4ddaf9c 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1423,7 +1423,7 @@ PySocketSock_makefile(PySocketSockObject *s, PyObject *args) char *mode = "r"; int bufsize = -1; #ifdef MS_WIN32 - intptr_t fd; + Py_intptr_t fd; #else int fd; #endif |