mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix some logic in PythonCmd() -- if the AsString() call failed, we'd
be calling LEAVE_PYTHON twice (once in PythonCmd_Error() and once in PythonCmd() itself). This fix doesn't fix the IDLE problems, but at least makes them more debuggable by getting rid of the segfault. Will backport.
This commit is contained in:
parent
9ce8e38099
commit
516f41e032
1 changed files with 3 additions and 1 deletions
|
@ -1982,7 +1982,9 @@ PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
|
|||
|
||||
s = AsString(res, tmp);
|
||||
if (s == NULL) {
|
||||
rv = PythonCmd_Error(interp);
|
||||
Py_DECREF(res);
|
||||
Py_DECREF(tmp);
|
||||
return PythonCmd_Error(interp);
|
||||
}
|
||||
else {
|
||||
Tcl_SetResult(Tkapp_Interp(self), s, TCL_VOLATILE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue