From 024da3545b9a47101c3757e3ee90b0fcf4db0a18 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 30 May 2001 06:09:50 +0000 Subject: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/errors.c') diff --git a/Python/errors.c b/Python/errors.c index 8d02b8e262..89d956f977 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -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; } -- cgit v1.2.1