diff options
author | Jesus Cea <jcea@jcea.es> | 2011-09-19 17:11:26 +0200 |
---|---|---|
committer | Jesus Cea <jcea@jcea.es> | 2011-09-19 17:11:26 +0200 |
commit | 5709b0a9933ce87f78389617abfd934fd113ba5f (patch) | |
tree | ad751c5cbc2f43440c1faf775e102decfa0f9dcb /Python/thread_pthread.h | |
parent | 66c4188b352a7c021c7b83f70d1a1e54bbed45df (diff) | |
parent | 016d82354232e8a1924135ff10fac70cf5c720b9 (diff) | |
download | cpython-5709b0a9933ce87f78389617abfd934fd113ba5f.tar.gz |
Close #13007: whichdb should recognize gdbm 1.9 magic numbers
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r-- | Python/thread_pthread.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 3efccf660a..4b61e18941 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -144,7 +144,7 @@ typedef struct { * Initialization. */ -#ifdef _HAVE_BSDI +#if defined(_HAVE_BSDI) static void _noop(void) { @@ -240,8 +240,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg) hosed" because: - It does not guarantee the promise that a non-zero integer is returned. - The cast to long is inherently unsafe. - - It is not clear that the 'volatile' (for AIX?) and ugly casting in the - latter return statement (for Alpha OSF/1) are any longer necessary. + - It is not clear that the 'volatile' (for AIX?) are any longer necessary. */ long PyThread_get_thread_ident(void) @@ -249,13 +248,8 @@ PyThread_get_thread_ident(void) volatile pthread_t threadid; if (!initialized) PyThread_init_thread(); - /* Jump through some hoops for Alpha OSF/1 */ threadid = pthread_self(); -#if SIZEOF_PTHREAD_T <= SIZEOF_LONG return (long) threadid; -#else - return (long) *(long *) &threadid; -#endif } void |