Skip to content

Commit

Permalink
[3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_…
Browse files Browse the repository at this point in the history
…NOARGS code paths (gh-99461) (#99514)

Manual backport of GH-99461.
  • Loading branch information
hoodmane authored Nov 16, 2022
1 parent 0a208d5 commit a06fb51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -5025,7 +5025,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
goto error;
}
PyObject *arg = TOP();
PyObject *res = cfunc(PyCFunction_GET_SELF(callable), arg);
PyObject *res = _PyCFunction_TrampolineCall(cfunc, PyCFunction_GET_SELF(callable), arg);
_Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));

Expand Down Expand Up @@ -5226,7 +5226,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
goto error;
}
PyObject *res = cfunc(self, arg);
PyObject *res = _PyCFunction_TrampolineCall(cfunc, self, arg);
_Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
Py_DECREF(self);
Expand Down Expand Up @@ -5298,7 +5298,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
goto error;
}
PyObject *res = cfunc(self, NULL);
PyObject *res = _PyCFunction_TrampolineCall(cfunc, self, NULL);
_Py_LeaveRecursiveCallTstate(tstate);
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
Py_DECREF(self);
Expand Down

0 comments on commit a06fb51

Please sign in to comment.