]> granicus.if.org Git - python/commitdiff
Merged revisions 70218-70219 via svnmerge from
authorGuilherme Polo <ggpolo@gmail.com>
Sat, 7 Mar 2009 01:54:57 +0000 (01:54 +0000)
committerGuilherme Polo <ggpolo@gmail.com>
Sat, 7 Mar 2009 01:54:57 +0000 (01:54 +0000)
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
Misc/NEWS
Modules/_tkinter.c

index 3d519edde318a423064ce75b496707690167aefe..b84bdf0559a8f9ffdc5113df3f8799b9e89ebcf4 100644 (file)
@@ -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)
index 4be13a46f4adb5b890f6d997e6c845d828460023..45bd799804cf625ad32aaf60373957a7627b6f25 100644 (file)
--- 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.
 
index bc5523cbdba0ed2ae47205c3e2f3299e0fe6919a..9e7f374757c5def471540872af4f6f50ab4df0af 100644 (file)
@@ -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;
        }