summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/lib-tk/Tkinter.py2
-rw-r--r--Misc/NEWS6
-rw-r--r--Modules/_tkinter.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index fded249..825e58d 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -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)
diff --git a/Misc/NEWS b/Misc/NEWS
index 41fff29..8d6b108 100644
--- 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.
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index d13690d..83501bf 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -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;
}