Mercurial > cpython-lru_cache-weakref
comparison Python/thread.c @ 13658:f79434ee41fa legacy-trunk
Mass ANSIfication of function definitions. Doesn't cover all 'extern'
declarations yet, those come later.
| author | Thomas Wouters <thomas@python.org> |
|---|---|
| date | Sat, 22 Jul 2000 18:47:25 +0000 |
| parents | 87ee82e5c56d |
| children | 9db86b27278f |
comparison
equal
deleted
inserted
replaced
| 13657:6a5314a6c2c2 | 13658:f79434ee41fa |
|---|---|
| 27 | 27 |
| 28 #ifdef HAVE_STDLIB_H | 28 #ifdef HAVE_STDLIB_H |
| 29 #include <stdlib.h> | 29 #include <stdlib.h> |
| 30 #else | 30 #else |
| 31 #ifdef Py_DEBUG | 31 #ifdef Py_DEBUG |
| 32 extern char *getenv(); | 32 extern char *getenv(const char *); |
| 33 #endif | 33 #endif |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 #ifdef HAVE_UNISTD_H | 36 #ifdef HAVE_UNISTD_H |
| 37 #include <unistd.h> | 37 #include <unistd.h> |
| 71 #define _POSIX_THREADS | 71 #define _POSIX_THREADS |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 #endif /* _POSIX_THREADS */ | 74 #endif /* _POSIX_THREADS */ |
| 75 | 75 |
| 76 #ifdef __STDC__ | |
| 77 #define _P(args) args | |
| 78 #define _P0() (void) | |
| 79 #define _P1(v,t) (t) | |
| 80 #define _P2(v1,t1,v2,t2) (t1,t2) | |
| 81 #else | |
| 82 #define _P(args) () | |
| 83 #define _P0() () | |
| 84 #define _P1(v,t) (v) t; | |
| 85 #define _P2(v1,t1,v2,t2) (v1,v2) t1; t2; | |
| 86 #endif /* __STDC__ */ | |
| 87 | 76 |
| 88 #ifdef Py_DEBUG | 77 #ifdef Py_DEBUG |
| 89 static int thread_debug = 0; | 78 static int thread_debug = 0; |
| 90 #define dprintf(args) ((thread_debug & 1) && printf args) | 79 #define dprintf(args) ((thread_debug & 1) && printf args) |
| 91 #define d2printf(args) ((thread_debug & 8) && printf args) | 80 #define d2printf(args) ((thread_debug & 8) && printf args) |
| 96 | 85 |
| 97 static int initialized; | 86 static int initialized; |
| 98 | 87 |
| 99 static void PyThread__init_thread(); /* Forward */ | 88 static void PyThread__init_thread(); /* Forward */ |
| 100 | 89 |
| 101 void PyThread_init_thread _P0() | 90 void PyThread_init_thread(void) |
| 102 { | 91 { |
| 103 #ifdef Py_DEBUG | 92 #ifdef Py_DEBUG |
| 104 char *p = getenv("THREADDEBUG"); | 93 char *p = getenv("THREADDEBUG"); |
| 105 | 94 |
| 106 if (p) { | 95 if (p) { |
