Author: guido.van.rossum
Date: Thu Aug  9 23:42:19 2007
New Revision: 56875

Modified:
   python/branches/py3k/Modules/_tkinter.c
Log:
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.


Modified: python/branches/py3k/Modules/_tkinter.c
==============================================================================
--- python/branches/py3k/Modules/_tkinter.c     (original)
+++ python/branches/py3k/Modules/_tkinter.c     Thu Aug  9 23:42:19 2007
@@ -1982,7 +1982,9 @@
 
        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);
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to