diff options
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 4e7035a..09e411e 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -48,7 +48,7 @@ extern const char *PyWin_DLLVersionString; PyObject * PySys_GetObject(char *name) { - PyThreadState *tstate = PyThreadState_Get(); + PyThreadState *tstate = PyThreadState_GET(); PyObject *sd = tstate->interp->sysdict; if (sd == NULL) return NULL; @@ -70,7 +70,7 @@ PySys_GetFile(char *name, FILE *def) int PySys_SetObject(char *name, PyObject *v) { - PyThreadState *tstate = PyThreadState_Get(); + PyThreadState *tstate = PyThreadState_GET(); PyObject *sd = tstate->interp->sysdict; if (v == NULL) { if (PyDict_GetItemString(sd, name) == NULL) @@ -86,7 +86,7 @@ static PyObject * sys_displayhook(PyObject *self, PyObject *o) { PyObject *outf; - PyInterpreterState *interp = PyThreadState_Get()->interp; + PyInterpreterState *interp = PyThreadState_GET()->interp; PyObject *modules = interp->modules; PyObject *builtins = PyDict_GetItemString(modules, "__builtin__"); @@ -149,7 +149,7 @@ static PyObject * sys_exc_info(PyObject *self, PyObject *noargs) { PyThreadState *tstate; - tstate = PyThreadState_Get(); + tstate = PyThreadState_GET(); return Py_BuildValue( "(OOO)", 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." static PyObject * sys_exc_clear(PyObject *self, PyObject *noargs) { - PyThreadState *tstate = PyThreadState_Get(); + PyThreadState *tstate = PyThreadState_GET(); PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -514,7 +514,7 @@ static PyObject * sys_setdlopenflags(PyObject *self, PyObject *args) { int new_val; - PyThreadState *tstate = PyThreadState_Get(); + PyThreadState *tstate = PyThreadState_GET(); if (!PyArg_ParseTuple(args, "i:setdlopenflags", &new_val)) return NULL; if (!tstate) @@ -537,7 +537,7 @@ sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)" static PyObject * sys_getdlopenflags(PyObject *self, PyObject *args) { - PyThreadState *tstate = PyThreadState_Get(); + PyThreadState *tstate = PyThreadState_GET(); if (!tstate) return NULL; return PyInt_FromLong(tstate->interp->dlopenflags); @@ -615,7 +615,7 @@ purposes only." static PyObject * sys_getframe(PyObject *self, PyObject *args) { - PyFrameObject *f = PyThreadState_Get()->frame; + PyFrameObject *f = PyThreadState_GET()->frame; int depth = -1; if (!PyArg_ParseTuple(args, "|i:_getframe", &depth)) |