diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/_warnings.c | 12 | ||||
-rw-r--r-- | Python/ceval.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 4d65bb3..86bbfa1 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -32,14 +32,14 @@ _Py_IDENTIFIER(__name__); static WarningsState * warnings_get_state(void) { - PyThreadState *tstate = _PyThreadState_GET(); - if (tstate == NULL) { - _PyErr_SetString(tstate, PyExc_RuntimeError, - "warnings_get_state: could not identify " - "current interpreter"); + PyInterpreterState *interp = _PyInterpreterState_GET(); + if (interp == NULL) { + PyErr_SetString(PyExc_RuntimeError, + "warnings_get_state: could not identify " + "current interpreter"); return NULL; } - return &tstate->interp->warnings; + return &interp->warnings; } /* Clear the given warnings module state. */ diff --git a/Python/ceval.c b/Python/ceval.c index d1d0779..9f2cbb0 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -788,8 +788,8 @@ _PyEval_FiniState(struct _ceval_state *ceval) int Py_GetRecursionLimit(void) { - PyThreadState *tstate = _PyThreadState_GET(); - return tstate->interp->ceval.recursion_limit; + PyInterpreterState *interp = _PyInterpreterState_GET(); + return interp->ceval.recursion_limit; } void |