[Python-checkins] cpython (3.3): Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call

serhiy.storchaka python-checkins at python.org
Fri Sep 20 22:29:14 CEST 2013


http://hg.python.org/cpython/rev/08c45e18e7b2
changeset:   85762:08c45e18e7b2
branch:      3.3
parent:      85758:68a7d77a90c3
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Fri Sep 20 23:21:44 2013 +0300
summary:
  Issue #3015: Fixed tkinter with wantobject=False.  Any Tcl command call
returned empty string.

files:
  Misc/NEWS          |  3 +++
  Modules/_tkinter.c |  5 +----
  2 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -68,6 +68,9 @@
 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.
 
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1227,10 +1227,7 @@
         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;
 }

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list