summaryrefslogtreecommitdiffstats
path: root/Parser/myreadline.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-07-07 20:42:07 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-07-07 20:42:07 (GMT)
commitb7e898a0e2a8d4077cbabeada039200fde5ada60 (patch)
tree5fbc6045e27ba11a03e924d4a70ebbf4ac34b33c /Parser/myreadline.c
parent30ea2f223f5c0a85a13bd893063555a9f587cd6d (diff)
downloadcpython-b7e898a0e2a8d4077cbabeada039200fde5ada60.zip
cpython-b7e898a0e2a8d4077cbabeada039200fde5ada60.tar.gz
cpython-b7e898a0e2a8d4077cbabeada039200fde5ada60.tar.bz2
"#if WITH_THREAD" is incorrect; must be #ifdef instead; WITH_THREAD
isn't always set to an integer value when it's defined.
Diffstat (limited to 'Parser/myreadline.c')
-rw-r--r--Parser/myreadline.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index ff9fc91..979e34f 100644
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -22,7 +22,7 @@ extern char* vms__StdioReadline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
PyThreadState* _PyOS_ReadlineTState;
-#if WITH_THREAD
+#ifdef WITH_THREAD
#include "pythread.h"
static PyThread_type_lock _PyOS_ReadlineLock = NULL;
#endif
@@ -181,7 +181,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
#endif
}
-#if WITH_THREAD
+#ifdef WITH_THREAD
if (_PyOS_ReadlineLock == NULL) {
_PyOS_ReadlineLock = PyThread_allocate_lock();
}
@@ -189,7 +189,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
_PyOS_ReadlineTState = PyThreadState_GET();
Py_BEGIN_ALLOW_THREADS
-#if WITH_THREAD
+#ifdef WITH_THREAD
PyThread_acquire_lock(_PyOS_ReadlineLock, 1);
#endif
@@ -205,7 +205,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
prompt);
Py_END_ALLOW_THREADS
-#if WITH_THREAD
+#ifdef WITH_THREAD
PyThread_release_lock(_PyOS_ReadlineLock);
#endif