Skip to content

Commit c13c1c7

Browse files
committed
take into account redirects in wrappers
1 parent a41250b commit c13c1c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

emscripten.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,10 @@ def fix_item(item):
932932
if item == '0': return bad if not newline else (bad + '\n')
933933
if item not in metadata['implementedFunctions']:
934934
# this is imported into asm, we must wrap it
935-
code = item + '(' + coerced_params + ')'
935+
call_ident = item
936+
if call_ident in metadata['redirects']: call_ident = metadata['redirects'][call_ident]
937+
if not call_ident.startswith('_') and not call_ident.startswith('Math_'): call_ident = '_' + call_ident
938+
code = call_ident + '(' + coerced_params + ')'
936939
if sig[0] != 'v':
937940
code = 'return ' + shared.JS.make_coercion(code, sig[0], settings)
938941
code += ';'

0 commit comments

Comments
 (0)