summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 46da295..f3a74b0 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -532,8 +532,8 @@ PyEval_EvalFrame(PyFrameObject *f) {
PyObject *
PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
{
- PyThreadState *tstate = PyThreadState_GET();
- return tstate->interp->eval_frame(f, throwflag);
+ PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE();
+ return interp->eval_frame(f, throwflag);
}
PyObject* _Py_HOT_FUNCTION
@@ -4435,7 +4435,7 @@ PyEval_GetBuiltins(void)
{
PyFrameObject *current_frame = PyEval_GetFrame();
if (current_frame == NULL)
- return PyThreadState_GET()->interp->builtins;
+ return _PyInterpreterState_GET_UNSAFE()->builtins;
else
return current_frame->f_builtins;
}
@@ -4769,7 +4769,7 @@ import_name(PyFrameObject *f, PyObject *name, PyObject *fromlist, PyObject *leve
}
/* Fast path for not overloaded __import__. */
- if (import_func == PyThreadState_GET()->interp->import_func) {
+ if (import_func == _PyInterpreterState_GET_UNSAFE()->import_func) {
int ilevel = _PyLong_AsInt(level);
if (ilevel == -1 && PyErr_Occurred()) {
return NULL;
@@ -5136,7 +5136,7 @@ _Py_GetDXProfile(PyObject *self, PyObject *args)
Py_ssize_t
_PyEval_RequestCodeExtraIndex(freefunc free)
{
- PyInterpreterState *interp = PyThreadState_Get()->interp;
+ PyInterpreterState *interp = _PyInterpreterState_GET_UNSAFE();
Py_ssize_t new_index;
if (interp->co_extra_user_count == MAX_CO_EXTRA_USERS - 1) {