From 56f5be5317c2b8ec55fb7cbf82467986b4c5f3ff Mon Sep 17 00:00:00 2001 From: Guilherme Polo Date: Sat, 7 Mar 2009 01:54:57 +0000 Subject: Merged revisions 70218-70219 via svnmerge from svn+ssh://pythondev/python/trunk ........ r70218 | guilherme.polo | 2009-03-06 22:19:12 -0300 (Fri, 06 Mar 2009) | 1 line Fixed issue #5193: Guarantee that Tkinter.Text.search returns a string. ........ r70219 | guilherme.polo | 2009-03-06 22:47:49 -0300 (Fri, 06 Mar 2009) | 4 lines Fixed issue #4792: Prevent a segfault in _tkinter by using the guaranteed to be safe interp argument given to the PythonCmd in place of the Tcl interpreter taken from a PythonCmd_ClientData. ........ --- Lib/tkinter/__init__.py | 2 +- Misc/NEWS | 6 ++++++ Modules/_tkinter.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 3d519ed..b84bdf0 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -3030,7 +3030,7 @@ class Text(Widget): args.append(pattern) args.append(index) if stopindex: args.append(stopindex) - return self.tk.call(tuple(args)) + return str(self.tk.call(tuple(args))) def see(self, index): """Scroll such that the character at INDEX is visible.""" self.tk.call(self._w, 'see', index) diff --git a/Misc/NEWS b/Misc/NEWS index 4be13a4..45bd799 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -183,6 +183,12 @@ Core and Builtins Library ------- +- Issue #4792: Prevent a segfault in _tkinter by using the + guaranteed to be safe interp argument given to the PythonCmd in place of + the Tcl interpreter taken from a PythonCmd_ClientData. + +- Issue #5193: Guarantee that tkinter.Text.search returns a string. + - Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler. Original patch by Akira Kitada. diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index bc5523c..9e7f374 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -2026,7 +2026,7 @@ PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) return PythonCmd_Error(interp); } else { - Tcl_SetObjResult(Tkapp_Interp(self), obj_res); + Tcl_SetObjResult(interp, obj_res); rv = TCL_OK; } -- cgit v0.12