]> granicus.if.org Git - python/commitdiff
Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 20 Sep 2013 20:21:44 +0000 (23:21 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 20 Sep 2013 20:21:44 +0000 (23:21 +0300)
returned empty string.

Misc/NEWS
Modules/_tkinter.c

index 451aba63bae4ca1cdaa1b55c41385a9266e64e4e..c3d9e9ed776dc3b8fc6e02b5e3640ab447c6a090 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -68,6 +68,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #3015: Fixed tkinter with wantobject=False.  Any Tcl command call
+  returned empty string.
+
 - Issue #18050: Fixed an incompatibility of the re module with Python 3.3.0
   binaries.
 
index e6b72d3917235c4edd2cce66b1cf7708415d62f2..1350ff5cb95b0166e22d9ecc336e07ff5dc251b7 100644 (file)
@@ -1227,10 +1227,7 @@ Tkapp_CallResult(TkappObject *self)
         res = FromObj((PyObject*)self, value);
         Tcl_DecrRefCount(value);
     } else {
-        const char *s = Tcl_GetStringResult(self->interp);
-        const char *p = s;
-
-        res = PyUnicode_FromStringAndSize(s, (int)(p-s));
+        res = PyUnicode_FromString(Tcl_GetStringResult(self->interp));
     }
     return res;
 }