GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Emscripten trampolines not quite right since #106219 · Issue #121700 · python/cpython

Emscripten trampolines not quite right since #106219 #121700

New issue
Copy link
New issue
Copy link
Closed
Closed
Emscripten trampolines not quite right since #106219#121700
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@hoodmane
hoodmane
opened on Jul 13, 2024
Issue body actions

Bug report

Bug description:

pycore_emscripten_trampoline.h defines _PyCFunctionWithKeywords_TrampolineCall as a macro but pycore_object.h tries to declare it. This leads to a compile error. The fix is to delete the declaration from pycore_object.h.

--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -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) \

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

  • gh-121700 Emscripten trampolines not quite right since #106219 #121701
  • [3.13] gh-121700 Emscripten trampolines not quite right since GH-106219 (GH-121701) #121744
  • gh-106213: Shorten Emscripten wasm-gc trampoline by a little #133984

Activity

  1. hoodmane
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jul 13, 2024
  2. hoodmane
    added a commit that references this issue on Jul 13, 2024

    pythongh-121700 Emscripten trampolines not quite right since python#1…

    3fa7c06
  3. encukou
    added a commit that references this issue on Jul 14, 2024

    gh-121700 Emscripten trampolines not quite right since #106219 (GH-12…

    3086b86
  4. miss-islington
    added a commit that references this issue on Jul 14, 2024

    pythongh-121700 Emscripten trampolines not quite right since pythonGH…

    f668266
  5. encukou
    added a commit that references this issue on Jul 14, 2024

    [3.13] gh-121700 Emscripten trampolines not quite right since GH-106219…

    8f3ffb4
  6. encukou
    closed this as completedon Jul 14, 2024
  7. estyxx
    added a commit that references this issue on Jul 17, 2024

    pythongh-121700 Emscripten trampolines not quite right since python#1…

    5848390
  8. hoodmane
    added a commit that references this issue on May 13, 2025

    pythongh-121700 Shorten Emscripten trampolines by a little

    5680660
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.