summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-05-19 19:57:42 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-05-19 19:57:42 (GMT)
commit8fd86cc46e0f056bd8af5dfe4c6ad1a30af453d5 (patch)
tree3a54d5e533b06cef1813943dcd27926f90f110da
parent77892373313b7195e16755abe0604bd734df4736 (diff)
downloadcpython-8fd86cc46e0f056bd8af5dfe4c6ad1a30af453d5.zip
cpython-8fd86cc46e0f056bd8af5dfe4c6ad1a30af453d5.tar.gz
cpython-8fd86cc46e0f056bd8af5dfe4c6ad1a30af453d5.tar.bz2
Only return objects if wantobjects is set in GetVar.
-rw-r--r--Modules/_tkinter.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 288ed15..fbc6ec1 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1647,7 +1647,12 @@ GetVar(PyObject *self, PyObject *args, int flags)
ENTER_TCL
tres = Tcl_GetVar2Ex(Tkapp_Interp(self), name1, name2, flags);
ENTER_OVERLAP
- res = FromObj(self, tres);
+ if (((TkappObject*)self)->wantobjects) {
+ res = FromObj(self, tres);
+ }
+ else {
+ res = PyString_FromString(Tcl_GetString(tres));
+ }
LEAVE_OVERLAP_TCL
return res;
}