]> granicus.if.org Git - python/commit
PyErr_Occurred(): Use PyThreadState_GET(), which saves a tiny function call
authorTim Peters <tim.peters@gmail.com>
Wed, 30 May 2001 06:09:50 +0000 (06:09 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 30 May 2001 06:09:50 +0000 (06:09 +0000)
commit024da3545b9a47101c3757e3ee90b0fcf4db0a18
treeb0bebf01fa534d7df62aa21badbcc25358fc39b0
parent6cba3d0e64453a8e567f3ef155f0263f48634c72
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
Python/errors.c