Skip to content

Commit a06fb51

Browse files
authored
[3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (gh-99461) (#99514)
Manual backport of GH-99461.
1 parent 0a208d5 commit a06fb51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/ceval.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -5025,7 +5025,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
50255025
goto error;
50265026
}
50275027
PyObject *arg = TOP();
5028-
PyObject *res = cfunc(PyCFunction_GET_SELF(callable), arg);
5028+
PyObject *res = _PyCFunction_TrampolineCall(cfunc, PyCFunction_GET_SELF(callable), arg);
50295029
_Py_LeaveRecursiveCallTstate(tstate);
50305030
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
50315031

@@ -5226,7 +5226,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
52265226
if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
52275227
goto error;
52285228
}
5229-
PyObject *res = cfunc(self, arg);
5229+
PyObject *res = _PyCFunction_TrampolineCall(cfunc, self, arg);
52305230
_Py_LeaveRecursiveCallTstate(tstate);
52315231
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
52325232
Py_DECREF(self);
@@ -5298,7 +5298,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
52985298
if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
52995299
goto error;
53005300
}
5301-
PyObject *res = cfunc(self, NULL);
5301+
PyObject *res = _PyCFunction_TrampolineCall(cfunc, self, NULL);
53025302
_Py_LeaveRecursiveCallTstate(tstate);
53035303
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
53045304
Py_DECREF(self);

0 commit comments

Comments
 (0)