]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_NOARGS code...
authorHood Chatham <roberthoodchatham@gmail.com>
Wed, 16 Nov 2022 16:09:34 +0000 (08:09 -0800)
committerGitHub <noreply@github.com>
Wed, 16 Nov 2022 16:09:34 +0000 (08:09 -0800)
Manual backport of GH-99461.

Python/ceval.c

index b4ebf0c3d50e5068191ce7d353d03bebeb872e5c..8cbe838ddf2b6d3781ba8304e2633d4bc2a3e3f7 100644 (file)
@@ -5025,7 +5025,7 @@ handle_eval_breaker:
                 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));
 
@@ -5226,7 +5226,7 @@ handle_eval_breaker:
             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);
@@ -5298,7 +5298,7 @@ handle_eval_breaker:
             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);