@@ -48,7 +48,7 @@ extern const char *PyWin_DLLVersionString;
4848PyObject *
4949PySys_GetObject (char * name )
5050{
51- PyThreadState * tstate = PyThreadState_Get ();
51+ PyThreadState * tstate = PyThreadState_GET ();
5252 PyObject * sd = tstate -> interp -> sysdict ;
5353 if (sd == NULL )
5454 return NULL ;
@@ -70,7 +70,7 @@ PySys_GetFile(char *name, FILE *def)
7070int
7171PySys_SetObject (char * name , PyObject * v )
7272{
73- PyThreadState * tstate = PyThreadState_Get ();
73+ PyThreadState * tstate = PyThreadState_GET ();
7474 PyObject * sd = tstate -> interp -> sysdict ;
7575 if (v == NULL ) {
7676 if (PyDict_GetItemString (sd , name ) == NULL )
@@ -86,7 +86,7 @@ static PyObject *
8686sys_displayhook (PyObject * self , PyObject * o )
8787{
8888 PyObject * outf ;
89- PyInterpreterState * interp = PyThreadState_Get ()-> interp ;
89+ PyInterpreterState * interp = PyThreadState_GET ()-> interp ;
9090 PyObject * modules = interp -> modules ;
9191 PyObject * builtins = PyDict_GetItemString (modules , "__builtin__" );
9292
@@ -149,7 +149,7 @@ static PyObject *
149149sys_exc_info (PyObject * self , PyObject * noargs )
150150{
151151 PyThreadState * tstate ;
152- tstate = PyThreadState_Get ();
152+ tstate = PyThreadState_GET ();
153153 return Py_BuildValue (
154154 "(OOO)" ,
155155 tstate -> exc_type != NULL ? tstate -> exc_type : Py_None ,
@@ -168,7 +168,7 @@ clause in the current stack frame or in an older stack frame."
168168static PyObject *
169169sys_exc_clear (PyObject * self , PyObject * noargs )
170170{
171- PyThreadState * tstate = PyThreadState_Get ();
171+ PyThreadState * tstate = PyThreadState_GET ();
172172 PyObject * tmp_type , * tmp_value , * tmp_tb ;
173173 tmp_type = tstate -> exc_type ;
174174 tmp_value = tstate -> exc_value ;
@@ -514,7 +514,7 @@ static PyObject *
514514sys_setdlopenflags (PyObject * self , PyObject * args )
515515{
516516 int new_val ;
517- PyThreadState * tstate = PyThreadState_Get ();
517+ PyThreadState * tstate = PyThreadState_GET ();
518518 if (!PyArg_ParseTuple (args , "i:setdlopenflags" , & new_val ))
519519 return NULL ;
520520 if (!tstate )
@@ -537,7 +537,7 @@ sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)"
537537static PyObject *
538538sys_getdlopenflags (PyObject * self , PyObject * args )
539539{
540- PyThreadState * tstate = PyThreadState_Get ();
540+ PyThreadState * tstate = PyThreadState_GET ();
541541 if (!tstate )
542542 return NULL ;
543543 return PyInt_FromLong (tstate -> interp -> dlopenflags );
@@ -615,7 +615,7 @@ purposes only."
615615static PyObject *
616616sys_getframe (PyObject * self , PyObject * args )
617617{
618- PyFrameObject * f = PyThreadState_Get ()-> frame ;
618+ PyFrameObject * f = PyThreadState_GET ()-> frame ;
619619 int depth = -1 ;
620620
621621 if (!PyArg_ParseTuple (args , "|i:_getframe" , & depth ))
0 commit comments