mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Don't release the interpreter lock around PyParser_ParseFile().
It is needed so that tokenizer.c can use PySys_WriteStderr().
This commit is contained in:
parent
b9f48608f6
commit
53195c1a83
1 changed files with 0 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue