Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/libdylink.js
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ var LibraryDylink = {
cSig = cSig.split(',');
for (var arg of cSig) {
var jsArg = arg.split(' ').pop();
jsArgs.push(jsArg.replace('*', ''));
jsArgs.push(jsArg.replaceAll('*', ''));
}
}
var func = `(${jsArgs}) => ${body};`;
Expand Down
8 changes: 4 additions & 4 deletions test/codesize/test_codesize_hello_dylink.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"a.out.js": 26546,
"a.out.js.gz": 11349,
"a.out.js": 26549,
"a.out.js.gz": 11353,
"a.out.nodebug.wasm": 17761,
"a.out.nodebug.wasm.gz": 9003,
"total": 44307,
"total_gz": 20352,
"total": 44310,
"total_gz": 20356,
"sent": [
"__syscall_stat64",
"emscripten_resize_heap",
Expand Down
4 changes: 2 additions & 2 deletions test/codesize/test_codesize_hello_dylink_all.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"a.out.js": 245299,
"a.out.js": 245302,
"a.out.nodebug.wasm": 574162,
"total": 819461,
"total": 819464,
"sent": [
"IMG_Init",
"IMG_Load",
Expand Down
1 change: 1 addition & 0 deletions test/other/test_em_js_main.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ in main
hello from side module 42 + hello
hello again
hello from void func
hello
6 changes: 6 additions & 0 deletions test/other/test_em_js_side.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ EM_JS(void, js_side_func_void, (), {
out(`hello from void func`);
});

EM_JS(void, js_side_func_indirect_ptr, (const char **pptr), {
out(UTF8ToString(getValue(pptr, '*')));
});

int test_side() {
const char *hello = "hello";
js_side_func(42, "hello");
js_side_func2("hello again");
js_side_func_void();
js_side_func_indirect_ptr(&hello);
return 0;
}