]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-121700 Emscripten trampolines not quite right since GH-106219 (GH-121701...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 14 Jul 2024 10:37:00 +0000 (12:37 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Jul 2024 10:37:00 +0000 (12:37 +0200)
(cherry picked from commit 3086b86cfda829e23a71569908edbfbcdc16327f)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Include/internal/pycore_object.h

index e016ec5e12ce6e36fbc21f57b4586246f5fd3087..74c1916804aca4489ba106a88fd1b55a0fbdaae2 100644 (file)
@@ -747,13 +747,7 @@ PyAPI_FUNC(PyObject*) _PyObject_GetState(PyObject *);
  * Third party code unintentionally rely on problematic fpcasts. The call
  * trampoline mitigates common occurrences of bad fpcasts on Emscripten.
  */
-#if defined(__EMSCRIPTEN__) && defined(PY_CALL_TRAMPOLINE)
-#define _PyCFunction_TrampolineCall(meth, self, args) \
-    _PyCFunctionWithKeywords_TrampolineCall( \
-        (*(PyCFunctionWithKeywords)(void(*)(void))(meth)), (self), (args), NULL)
-extern PyObject* _PyCFunctionWithKeywords_TrampolineCall(
-    PyCFunctionWithKeywords meth, PyObject *, PyObject *, PyObject *);
-#else
+#if !(defined(__EMSCRIPTEN__) && defined(PY_CALL_TRAMPOLINE))
 #define _PyCFunction_TrampolineCall(meth, self, args) \
     (meth)((self), (args))
 #define _PyCFunctionWithKeywords_TrampolineCall(meth, self, args, kw) \