Skip to content

Commit bc54b9e

Browse files
wip
1 parent c0d63f6 commit bc54b9e

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

Python/bytecodes.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4779,9 +4779,10 @@ dummy_func(
47794779
assert(oparg == 2);
47804780
EXIT_IF(_Py_ReachedRecursionLimit(tstate));
47814781
STAT_INC(CALL, hit);
4782+
volatile PyCFunction cfunc_v = (PyCFunction)cfunc;
47824783
PyObject *res_o = _PyCallMethodDescriptorO_StackRef(
47834784
callable,
4784-
(PyCFunction)cfunc,
4785+
cfunc_v,
47854786
args[0],
47864787
args[1]
47874788
);
@@ -4855,9 +4856,10 @@ dummy_func(
48554856
PyObject *self = PyStackRef_AsPyObjectBorrow(args[0]);
48564857
assert(self != NULL);
48574858
STAT_INC(CALL, hit);
4859+
volatile PyCFunctionFastWithKeywords cfunc_v = _PyCFunctionFastWithKeywords_CAST(cfunc);
48584860
PyObject *res_o = _PyCallMethodDescriptorFastWithKeywords_StackRefSteal(
48594861
callable,
4860-
_PyCFunctionFastWithKeywords_CAST(cfunc),
4862+
cfunc_v,
48614863
self,
48624864
args,
48634865
oparg
@@ -4922,7 +4924,8 @@ dummy_func(
49224924
PyObject *self = PyStackRef_AsPyObjectBorrow(self_stackref);
49234925
EXIT_IF(_Py_ReachedRecursionLimit(tstate));
49244926
STAT_INC(CALL, hit);
4925-
PyObject *res_o = _PyCFunction_TrampolineCall((PyCFunction)cfunc, self, NULL);
4927+
volatile PyCFunction cfunc_v = (PyCFunction)cfunc;
4928+
PyObject *res_o = _PyCFunction_TrampolineCall(cfunc_v, self, NULL);
49264929
_Py_LeaveRecursiveCallTstate(tstate);
49274930
assert((res_o != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
49284931
PyStackRef_CLOSE(self_stackref);
@@ -4988,9 +4991,10 @@ dummy_func(
49884991
PyObject *self = PyStackRef_AsPyObjectBorrow(args[0]);
49894992
assert(self != NULL);
49904993
STAT_INC(CALL, hit);
4994+
volatile PyCFunctionFast cfunc_v = _PyCFunctionFast_CAST(cfunc);
49914995
PyObject *res_o = _PyCallMethodDescriptorFast_StackRefSteal(
49924996
callable,
4993-
_PyCFunctionFast_CAST(cfunc),
4997+
cfunc_v,
49944998
self,
49954999
args,
49965000
oparg

Python/executor_cases.c.h

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

0 commit comments

Comments
 (0)