[Python-checkins] python/dist/src/Modules _tkinter.c, 1.161, 1.161.8.1

loewis at users.sourceforge.net loewis at users.sourceforge.net
Fri Oct 3 13:11:47 EDT 2003


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv30330/Modules

Modified Files:
      Tag: release23-maint
	_tkinter.c 
Log Message:
Check for TclError when reading variables. Fixes #807314.


Index: _tkinter.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.161
retrieving revision 1.161.8.1
diff -C2 -d -r1.161 -r1.161.8.1
*** _tkinter.c	14 Jun 2003 21:34:32 -0000	1.161
--- _tkinter.c	3 Oct 2003 17:11:45 -0000	1.161.8.1
***************
*** 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