Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80c7bcf

Browse files
committed
The previous fix was still broken; the Py_END_ALLOW_THREADS macro was
never executed because of a return statement. Sigh.
1 parent 4d18740 commit 80c7bcf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Parser/myreadline.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,12 @@ char *
140140
PyOS_Readline(prompt)
141141
char *prompt;
142142
{
143+
char *rv;
143144
if (PyOS_ReadlineFunctionPointer == NULL) {
144145
PyOS_ReadlineFunctionPointer = PyOS_StdioReadline;
145146
}
146147
Py_BEGIN_ALLOW_THREADS
147-
return (*PyOS_ReadlineFunctionPointer)(prompt);
148+
rv = (*PyOS_ReadlineFunctionPointer)(prompt);
148149
Py_END_ALLOW_THREADS
150+
return rv;
149151
}

0 commit comments

Comments
 (0)