Skip to content

Commit 86a49e0

Browse files
authored
gh-99460 Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (#99461)
1 parent 65dab15 commit 86a49e0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Python/bytecodes.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -3192,7 +3192,7 @@ dummy_func(
31923192
goto error;
31933193
}
31943194
PyObject *arg = TOP();
3195-
PyObject *res = cfunc(PyCFunction_GET_SELF(callable), arg);
3195+
PyObject *res = _PyCFunction_TrampolineCall(cfunc, PyCFunction_GET_SELF(callable), arg);
31963196
_Py_LeaveRecursiveCallTstate(tstate);
31973197
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
31983198

@@ -3393,7 +3393,7 @@ dummy_func(
33933393
if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
33943394
goto error;
33953395
}
3396-
PyObject *res = cfunc(self, arg);
3396+
PyObject *res = _PyCFunction_TrampolineCall(cfunc, self, arg);
33973397
_Py_LeaveRecursiveCallTstate(tstate);
33983398
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
33993399
Py_DECREF(self);
@@ -3465,7 +3465,7 @@ dummy_func(
34653465
if (_Py_EnterRecursiveCallTstate(tstate, " while calling a Python object")) {
34663466
goto error;
34673467
}
3468-
PyObject *res = cfunc(self, NULL);
3468+
PyObject *res = _PyCFunction_TrampolineCall(cfunc, self, NULL);
34693469
_Py_LeaveRecursiveCallTstate(tstate);
34703470
assert((res != NULL) ^ (_PyErr_Occurred(tstate) != NULL));
34713471
Py_DECREF(self);

Python/generated_cases.c.h

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)