Skip to content

Commit 2d1cf73

Browse files
committed
Add trampoline calls to the optimized METH_O and METH_NOARGS call paths in bytecodes.c
1 parent db11568 commit 2d1cf73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
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);

0 commit comments

Comments
 (0)