-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The way to use WebAssembly type reflection has changed from a static method WebAssembly.Function.type(wasmFunc)
to an instance method wasmFunc.type()
. We use the old version here:
https://github.com/python/cpython/blob/main/Python/emscripten_trampoline.c?plain=1#L46
This needs to be updated as follows:
--- a/Python/emscripten_trampoline.c
+++ b/Python/emscripten_trampoline.c
@@ -43,7 +43,7 @@ EM_JS(int, _PyEM_CountFuncParams, (PyCFunctionWithKeywords func),
if (n !== undefined) {
return n;
}
- n = WebAssembly.Function.type(wasmTable.get(func)).parameters.length;
+ n = wasmTable.get(func).type().parameters.length;
_PyEM_CountFuncParams.cache.set(func, n);
return n;
}
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Linked PRs
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error