[Python-checkins] python/dist/src/Modules _tkinter.c,1.161,1.162
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Fri Oct 3 13:12:28 EDT 2003
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv30502/Modules
Modified Files:
_tkinter.c
Log Message:
Check for TclError when reading variables. Fixes #807314.
Backported to 2.3.
Index: _tkinter.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -C2 -d -r1.161 -r1.162
*** _tkinter.c 14 Jun 2003 21:34:32 -0000 1.161
--- _tkinter.c 3 Oct 2003 17:12:26 -0000 1.162
***************
*** 1648,1656 ****
tres = Tcl_GetVar2Ex(Tkapp_Interp(self), name1, name2, flags);
ENTER_OVERLAP
! if (((TkappObject*)self)->wantobjects) {
! res = FromObj(self, tres);
! }
! else {
! res = PyString_FromString(Tcl_GetString(tres));
}
LEAVE_OVERLAP_TCL
--- 1648,1660 ----
tres = Tcl_GetVar2Ex(Tkapp_Interp(self), name1, name2, flags);
ENTER_OVERLAP
! if (tres == NULL) {
! PyErr_SetString(Tkinter_TclError, Tcl_GetStringResult(Tkapp_Interp(self)));
! } else {
! if (((TkappObject*)self)->wantobjects) {
! res = FromObj(self, tres);
! }
! else {
! res = PyString_FromString(Tcl_GetString(tres));
! }
}
LEAVE_OVERLAP_TCL
More information about the Python-checkins
mailing list