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
diff --git a/Python/errors.c b/Python/errors.c
index 8d02b8e..89d956f 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -75,7 +75,7 @@
 PyObject *
 PyErr_Occurred(void)
 {
-	PyThreadState *tstate = PyThreadState_Get();
+	PyThreadState *tstate = PyThreadState_GET();
 
 	return tstate->curexc_type;
 }