Commit 80c7bcf6 authored by Guido van Rossum's avatar Guido van Rossum

The previous fix was still broken; the Py_END_ALLOW_THREADS macro was

never executed because of a return statement.  Sigh.
parent 4d187409
...@@ -140,10 +140,12 @@ char * ...@@ -140,10 +140,12 @@ char *
PyOS_Readline(prompt) PyOS_Readline(prompt)
char *prompt; char *prompt;
{ {
char *rv;
if (PyOS_ReadlineFunctionPointer == NULL) { if (PyOS_ReadlineFunctionPointer == NULL) {
PyOS_ReadlineFunctionPointer = PyOS_StdioReadline; PyOS_ReadlineFunctionPointer = PyOS_StdioReadline;
} }
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
return (*PyOS_ReadlineFunctionPointer)(prompt); rv = (*PyOS_ReadlineFunctionPointer)(prompt);
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
return rv;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment