diff Python/ceval.c @ 31797:846b3ee7e106 legacy-trunk

Changed random calls to PyThreadState_Get() to use the macro
author Nicholas Bastin <nick.bastin@gmail.com>
date Wed, 24 Mar 2004 22:22:12 +0000
parents 1c117dbb2def
children 9f5fe6b23e59
line wrap: on
line diff
--- a/Python/ceval.c	Wed Mar 24 21:57:10 2004 +0000
+++ b/Python/ceval.c	Wed Mar 24 22:22:12 2004 +0000
@@ -2843,7 +2843,7 @@
 {
 	if (type == NULL) {
 		/* Reraise */
-		PyThreadState *tstate = PyThreadState_Get();
+		PyThreadState *tstate = PyThreadState_GET();
 		type = tstate->exc_type == NULL ? Py_None : tstate->exc_type;
 		value = tstate->exc_value;
 		tb = tstate->exc_traceback;
@@ -3221,7 +3221,7 @@
 void
 PyEval_SetProfile(Py_tracefunc func, PyObject *arg)
 {
-	PyThreadState *tstate = PyThreadState_Get();
+	PyThreadState *tstate = PyThreadState_GET();
 	PyObject *temp = tstate->c_profileobj;
 	Py_XINCREF(arg);
 	tstate->c_profilefunc = NULL;
@@ -3236,7 +3236,7 @@
 void
 PyEval_SetTrace(Py_tracefunc func, PyObject *arg)
 {
-	PyThreadState *tstate = PyThreadState_Get();
+	PyThreadState *tstate = PyThreadState_GET();
 	PyObject *temp = tstate->c_traceobj;
 	Py_XINCREF(arg);
 	tstate->c_tracefunc = NULL;
@@ -3254,7 +3254,7 @@
 {
 	PyFrameObject *current_frame = PyEval_GetFrame();
 	if (current_frame == NULL)
-		return PyThreadState_Get()->interp->builtins;
+		return PyThreadState_GET()->interp->builtins;
 	else
 		return current_frame->f_builtins;
 }
@@ -3282,7 +3282,7 @@
 PyFrameObject *
 PyEval_GetFrame(void)
 {
-	PyThreadState *tstate = PyThreadState_Get();
+	PyThreadState *tstate = PyThreadState_GET();
 	return _PyThreadState_GetFrame(tstate);
 }