diff options
author | Hood Chatham <roberthoodchatham@gmail.com> | 2023-06-29 17:20:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 17:20:49 -0700 |
commit | e7bc8d16364bde54487eab349a29d58345e35f28 (patch) | |
tree | 24025e6c65bd886c308eb984b12380d590e3aad9 /Python/import.c | |
parent | cea9d4ea82abcb2c6f1d83a2fe819859da4bbda4 (diff) | |
download | cpython-e7bc8d16364bde54487eab349a29d58345e35f28.tar.gz cpython-e7bc8d16364bde54487eab349a29d58345e35f28.zip |
gh-106210 Remove Emscripten import trampoline (#106211)
It's no longer necessary.
Co-authored-by: Brett Cannon <brett@python.org>
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Python/import.c b/Python/import.c index b3699bdec99..324fe3812bd 100644 --- a/Python/import.c +++ b/Python/import.c @@ -839,16 +839,6 @@ _PyImport_ClearExtension(PyObject *name, PyObject *filename) } -/*******************/ - -#if defined(__EMSCRIPTEN__) && defined(PY_CALL_TRAMPOLINE) -#include <emscripten.h> -EM_JS(PyObject*, _PyImport_InitFunc_TrampolineCall, (PyModInitFunction func), { - return wasmTable.get(func)(); -}); -#endif // __EMSCRIPTEN__ && PY_CALL_TRAMPOLINE - - /*****************************/ /* single-phase init modules */ /*****************************/ @@ -1285,7 +1275,7 @@ import_find_extension(PyThreadState *tstate, PyObject *name, else { if (def->m_base.m_init == NULL) return NULL; - mod = _PyImport_InitFunc_TrampolineCall(def->m_base.m_init); + mod = def->m_base.m_init(); if (mod == NULL) return NULL; if (PyObject_SetItem(modules, name, mod) == -1) { @@ -1400,7 +1390,7 @@ create_builtin(PyThreadState *tstate, PyObject *name, PyObject *spec) /* Cannot re-init internal module ("sys" or "builtins") */ return import_add_module(tstate, name); } - mod = _PyImport_InitFunc_TrampolineCall(*p->initfunc); + mod = (*p->initfunc)(); if (mod == NULL) { return NULL; } |