mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189)
This commit is contained in:
parent
795c00b91c
commit
581c4434de
8 changed files with 99 additions and 18 deletions
|
|
@ -10,6 +10,14 @@ extern const char *_PyImport_DynLoadFiletab[];
|
|||
|
||||
extern PyObject *_PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *);
|
||||
|
||||
typedef PyObject *(*PyModInitFunction)(void);
|
||||
|
||||
#if defined(__EMSCRIPTEN__) && defined(PY_CALL_TRAMPOLINE)
|
||||
extern PyObject *_PyImport_InitFunc_TrampolineCall(PyModInitFunction func);
|
||||
#else
|
||||
#define _PyImport_InitFunc_TrampolineCall(func) (func)()
|
||||
#endif
|
||||
|
||||
/* Max length of module suffix searched for -- accommodates "module.slb" */
|
||||
#define MAXSUFFIXSIZE 12
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue