From: Guido van Rossum Date: Thu, 27 Aug 1998 19:14:49 +0000 (+0000) Subject: Don't release the interpreter lock around PyParser_ParseFile(). X-Git-Tag: v1.5.2a2~339 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53195c1a83e5721e4261c341cd5e13e97e4d0eb6;p=thirdparty%2FPython%2Fcpython.git Don't release the interpreter lock around PyParser_ParseFile(). It is needed so that tokenizer.c can use PySys_WriteStderr(). --- diff --git a/Python/pythonrun.c b/Python/pythonrun.c index fa544736c540..2be073bda0fa 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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;