[Python-checkins] CVS: python/dist/src/Python errors.c,2.62,2.63
Tim Peters
tim_one@users.sourceforge.net
Tue, 29 May 2001 23:09:52 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv28509/python/dist/src/Python
Modified Files:
errors.c
Log Message:
PyErr_Occurred(): Use PyThreadState_GET(), which saves a tiny function call
in release builds. Suggested by Martin v. Loewis.
I'm half tempted to macroize PyErr_Occurred too, as the whole thing could
collapse to just
_PyThreadState_Current->curexc_type
Index: errors.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/errors.c,v
retrieving revision 2.62
retrieving revision 2.63
diff -C2 -r2.62 -r2.63
*** errors.c 2001/03/06 12:12:02 2.62
--- errors.c 2001/05/30 06:09:50 2.63
***************
*** 76,80 ****
PyErr_Occurred(void)
{
! PyThreadState *tstate = PyThreadState_Get();
return tstate->curexc_type;
--- 76,80 ----
PyErr_Occurred(void)
{
! PyThreadState *tstate = PyThreadState_GET();
return tstate->curexc_type;