Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-121700 Emscripten trampolines not quite right since GH-106219 (GH-…
…121701)

(cherry picked from commit 3086b86)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
  • Loading branch information
hoodmane authored and miss-islington committed Jul 14, 2024
commit f6682667eeeed6450989ab46fcfacc6cd3c33d4c
8 changes: 1 addition & 7 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down