Skip to content

Commit dfb55d9

Browse files
authored
Use tstate->interp to get the interpreter state in bytecodes.c (GH-107506)
1 parent 5e584eb commit dfb55d9

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3245,7 +3245,7 @@ dummy_func(
32453245
total_args++;
32463246
}
32473247
DEOPT_IF(total_args != 1, CALL);
3248-
PyInterpreterState *interp = _PyInterpreterState_GET();
3248+
PyInterpreterState *interp = tstate->interp;
32493249
DEOPT_IF(callable != interp->callable_cache.len, CALL);
32503250
STAT_INC(CALL, hit);
32513251
PyObject *arg = args[0];
@@ -3272,7 +3272,7 @@ dummy_func(
32723272
total_args++;
32733273
}
32743274
DEOPT_IF(total_args != 2, CALL);
3275-
PyInterpreterState *interp = _PyInterpreterState_GET();
3275+
PyInterpreterState *interp = tstate->interp;
32763276
DEOPT_IF(callable != interp->callable_cache.isinstance, CALL);
32773277
STAT_INC(CALL, hit);
32783278
PyObject *cls = args[1];
@@ -3295,7 +3295,7 @@ dummy_func(
32953295
ASSERT_KWNAMES_IS_NULL();
32963296
assert(oparg == 1);
32973297
assert(method != NULL);
3298-
PyInterpreterState *interp = _PyInterpreterState_GET();
3298+
PyInterpreterState *interp = tstate->interp;
32993299
DEOPT_IF(method != interp->callable_cache.list_append, CALL);
33003300
DEOPT_IF(!PyList_Check(self), CALL);
33013301
STAT_INC(CALL, hit);

Python/executor_cases.c.h

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)