aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2023-07-31 14:18:38 -0700
committerGitHub <noreply@github.com>2023-07-31 14:18:38 -0700
commitdfb55d9d7f9349582a2077f87e95c8f9d5e2ebd4 (patch)
tree31be7921d9fd6b7254055d357e365f9e287f7768 /Python/bytecodes.c
parent5e584eb704d656c9a6a648dadda63237706287db (diff)
downloadcpython-dfb55d9d7f9349582a2077f87e95c8f9d5e2ebd4.tar.gz
cpython-dfb55d9d7f9349582a2077f87e95c8f9d5e2ebd4.zip
Use tstate->interp to get the interpreter state in bytecodes.c (GH-107506)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 7320c309884..0bea7b59597 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -3245,7 +3245,7 @@ dummy_func(
total_args++;
}
DEOPT_IF(total_args != 1, CALL);
- PyInterpreterState *interp = _PyInterpreterState_GET();
+ PyInterpreterState *interp = tstate->interp;
DEOPT_IF(callable != interp->callable_cache.len, CALL);
STAT_INC(CALL, hit);
PyObject *arg = args[0];
@@ -3272,7 +3272,7 @@ dummy_func(
total_args++;
}
DEOPT_IF(total_args != 2, CALL);
- PyInterpreterState *interp = _PyInterpreterState_GET();
+ PyInterpreterState *interp = tstate->interp;
DEOPT_IF(callable != interp->callable_cache.isinstance, CALL);
STAT_INC(CALL, hit);
PyObject *cls = args[1];
@@ -3295,7 +3295,7 @@ dummy_func(
ASSERT_KWNAMES_IS_NULL();
assert(oparg == 1);
assert(method != NULL);
- PyInterpreterState *interp = _PyInterpreterState_GET();
+ PyInterpreterState *interp = tstate->interp;
DEOPT_IF(method != interp->callable_cache.list_append, CALL);
DEOPT_IF(!PyList_Check(self), CALL);
STAT_INC(CALL, hit);