summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-08-27 19:43:43 (GMT)
committerGuido van Rossum <guido@python.org>1998-08-27 19:43:43 (GMT)
commit8efa47b63e80a2b1a7b5ff23fe00c90ee3254a4d (patch)
tree474c216254d27e4a3d667e6ed83412187961ed5a /Parser
parent44ee479427dd895efcbef2ab263da901836966a4 (diff)
downloadcpython-8efa47b63e80a2b1a7b5ff23fe00c90ee3254a4d.zip
cpython-8efa47b63e80a2b1a7b5ff23fe00c90ee3254a4d.tar.gz
cpython-8efa47b63e80a2b1a7b5ff23fe00c90ee3254a4d.tar.bz2
We now assume that PyOS_Readline() is called with the interpreter lock
held. It releases the lock around the call to the function pointed to by PyOS_ReadlineFunctionPointer (default PyOS_StdioReadline()).
Diffstat (limited to 'Parser')
-rw-r--r--Parser/myreadline.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index 24bb18c..56c343a 100644
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -39,17 +39,7 @@ PERFORMANCE OF THIS SOFTWARE.
- a malloc'ed string ending in \n normally
*/
-#define Py_USE_NEW_NAMES 1
-
-#include "config.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-
-#include "myproto.h"
-#include "mymalloc.h"
-#include "intrcheck.h"
+#include "Python.h"
int (*PyOS_InputHook)() = NULL;
@@ -153,5 +143,7 @@ PyOS_Readline(prompt)
if (PyOS_ReadlineFunctionPointer == NULL) {
PyOS_ReadlineFunctionPointer = PyOS_StdioReadline;
}
+ Py_BEGIN_ALLOW_THREADS
return (*PyOS_ReadlineFunctionPointer)(prompt);
+ Py_END_ALLOW_THREADS
}