mirror of
https://github.com/python/cpython.git
synced 2025-11-27 13:45:25 +00:00
Only return objects if wantobjects is set in GetVar.
This commit is contained in:
parent
7789237331
commit
8fd86cc46e
1 changed files with 6 additions and 1 deletions
|
|
@ -1647,7 +1647,12 @@ GetVar(PyObject *self, PyObject *args, int flags)
|
||||||
ENTER_TCL
|
ENTER_TCL
|
||||||
tres = Tcl_GetVar2Ex(Tkapp_Interp(self), name1, name2, flags);
|
tres = Tcl_GetVar2Ex(Tkapp_Interp(self), name1, name2, flags);
|
||||||
ENTER_OVERLAP
|
ENTER_OVERLAP
|
||||||
|
if (((TkappObject*)self)->wantobjects) {
|
||||||
res = FromObj(self, tres);
|
res = FromObj(self, tres);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
res = PyString_FromString(Tcl_GetString(tres));
|
||||||
|
}
|
||||||
LEAVE_OVERLAP_TCL
|
LEAVE_OVERLAP_TCL
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue