]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-121700 Emscripten trampolines not quite right since #106219 (GH-121701)
authorHood Chatham <roberthoodchatham@gmail.com>
Sun, 14 Jul 2024 09:24:09 +0000 (11:24 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Jul 2024 09:24:09 +0000 (11:24 +0200)
Include/internal/pycore_object.h

index fa789611133a6fe66e6a96eea59ca9e8f06fdc3a..d385b20b0e964d10f12e372ba67eb7442b8affb5 100644 (file)
@@ -733,13 +733,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) \