[Python-checkins] r56876 - python/trunk/Modules/_tkinter.c

guido.van.rossum python-checkins at python.org
Thu Aug 9 23:47:13 CEST 2007


Author: guido.van.rossum
Date: Thu Aug  9 23:47:11 2007
New Revision: 56876

Modified:
   python/trunk/Modules/_tkinter.c
Log:
Backport r56875 from py3k; double LEAVE_PYTHON when AsString() fails
in PythonCmd().


Modified: python/trunk/Modules/_tkinter.c
==============================================================================
--- python/trunk/Modules/_tkinter.c	(original)
+++ python/trunk/Modules/_tkinter.c	Thu Aug  9 23:47:11 2007
@@ -2028,7 +2028,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);


More information about the Python-checkins mailing list