Commit 024da354 authored by Tim Peters's avatar Tim Peters

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
parent 6cba3d0e
......@@ -75,7 +75,7 @@ PyErr_SetString(PyObject *exception, const char *string)
PyObject *
PyErr_Occurred(void)
{
PyThreadState *tstate = PyThreadState_Get();
PyThreadState *tstate = PyThreadState_GET();
return tstate->curexc_type;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment