[Python-checkins] CVS: python/dist/src/Python thread_nt.h,2.17,2.18
Tim Peters
tim_one@users.sourceforge.net
Wed, 29 Aug 2001 14:37:12 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv23991/Python
Modified Files:
thread_nt.h
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: thread_nt.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_nt.h,v
retrieving revision 2.17
retrieving revision 2.18
diff -C2 -d -r2.17 -r2.18
*** thread_nt.h 2000/09/01 23:29:28 2.17
--- thread_nt.h 2001/08/29 21:37:10 2.18
***************
*** 153,157 ****
int PyThread_start_new_thread(void (*func)(void *), void *arg)
{
! uintptr_t rv;
int success = 0;
--- 153,157 ----
int PyThread_start_new_thread(void (*func)(void *), void *arg)
{
! unsigned long rv;
int success = 0;
***************
*** 162,166 ****
rv = _beginthread(func, 0, arg); /* use default stack size */
! if (rv != -1) {
success = 1;
dprintf(("%ld: PyThread_start_new_thread succeeded: %p\n", PyThread_get_thread_ident(), rv));
--- 162,166 ----
rv = _beginthread(func, 0, arg); /* use default stack size */
! if (rv != (unsigned long)-1) {
success = 1;
dprintf(("%ld: PyThread_start_new_thread succeeded: %p\n", PyThread_get_thread_ident(), rv));