Backport r56875 from py3k; double LEAVE_PYTHON when AsString() fails

in PythonCmd().
This commit is contained in:
Guido van Rossum 2007-08-09 21:47:11 +00:00
parent 95d94947f0
commit b5e81aa53e
1 changed files with 3 additions and 1 deletions

View File

@ -2028,7 +2028,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);