diff Python/errors.c @ 18007:6a2e2548e6cf legacy-trunk

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
author Tim Peters <tim.peters@gmail.com>
date Wed, 30 May 2001 06:09:50 +0000
parents 86fd723f2928
children e1c91ac55cca
line wrap: on
line diff
--- a/Python/errors.c	Wed May 30 04:59:50 2001 +0000
+++ b/Python/errors.c	Wed May 30 06:09:50 2001 +0000
@@ -75,7 +75,7 @@
 PyObject *
 PyErr_Occurred(void)
 {
-	PyThreadState *tstate = PyThreadState_Get();
+	PyThreadState *tstate = PyThreadState_GET();
 
 	return tstate->curexc_type;
 }