]> granicus.if.org Git - python/commitdiff
We now assume that PyOS_Readline() is called with the interpreter lock
authorGuido van Rossum <guido@python.org>
Thu, 27 Aug 1998 19:43:43 +0000 (19:43 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 27 Aug 1998 19:43:43 +0000 (19:43 +0000)
held.  It releases the lock around the call to the function pointed to by
PyOS_ReadlineFunctionPointer (default PyOS_StdioReadline()).

Parser/myreadline.c

index 24bb18c653dc8cf289cb4a794795a59a8cd16151..56c343aa6d0b6186db4b337d4968398af9ebc7ce 100644 (file)
@@ -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
 }