]> granicus.if.org Git - python/commitdiff
Don't release the interpreter lock around PyParser_ParseFile().
authorGuido van Rossum <guido@python.org>
Thu, 27 Aug 1998 19:14:49 +0000 (19:14 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 27 Aug 1998 19:14:49 +0000 (19:14 +0000)
It is needed so that tokenizer.c can use PySys_WriteStderr().

Python/pythonrun.c

index fa544736c540a22141eafd6621c68ebe08c1732c..2be073bda0fa782984198fc63473e4a847a563ed 100644 (file)
@@ -500,10 +500,8 @@ PyRun_InteractiveOne(fp, filename)
                else if (PyString_Check(w))
                        ps2 = PyString_AsString(w);
        }
-       Py_BEGIN_ALLOW_THREADS
        n = PyParser_ParseFile(fp, filename, &_PyParser_Grammar,
                               Py_single_input, ps1, ps2, &err);
-       Py_END_ALLOW_THREADS
        Py_XDECREF(v);
        Py_XDECREF(w);
        if (n == NULL) {
@@ -942,10 +940,8 @@ PyParser_SimpleParseFile(fp, filename, start)
 {
        node *n;
        perrdetail err;
-       Py_BEGIN_ALLOW_THREADS
        n = PyParser_ParseFile(fp, filename, &_PyParser_Grammar, start,
                                (char *)0, (char *)0, &err);
-       Py_END_ALLOW_THREADS
        if (n == NULL)
                err_input(&err);
        return n;