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

index fded2491d55fba8e5a733cdc0da485abf0b89879..825e58dd2bd0fd980c18c66796d109d992dce985 100644 (file)
@@ -3046,7 +3046,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 41fff2995a7d56a44c5e997a3b028bdfbd35c42b..8d6b108d01cd1b0fca4306b1fc44d2471a30c1d3 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -89,6 +89,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 #5385: Fixed mmap crash after resize failure on windows.
 
 - Issue #5179: Fixed subprocess handle leak on failure on windows.
index d13690d360afa971bea6b1832747d6dffe6dfe1e..83501bfd74abfb3024b93d471eb154891357e5c2 100644 (file)
@@ -2030,7 +2030,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;
        }