mirror of
https://github.com/python/cpython.git
synced 2025-09-18 06:30:38 +00:00
The previous fix was still broken; the Py_END_ALLOW_THREADS macro was
never executed because of a return statement. Sigh.
This commit is contained in:
parent
4d1874093f
commit
80c7bcf667
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue