summaryrefslogtreecommitdiff
path: root/wasm2c/examples/callback/main.c
diff options
context:
space:
mode:
authorKeith Winstein <keithw@cs.stanford.edu>2023-10-24 10:28:52 -0700
committerGitHub <noreply@github.com>2023-10-24 10:28:52 -0700
commit6e350ee127b4e230160eab42eeadfc5021bb66e0 (patch)
tree973d7ff3739fbbc1a4b21a22a41d908f9141af0f /wasm2c/examples/callback/main.c
parent0e78c24fd231d5ee67ccd271bfa317faa963281c (diff)
downloadwabt-6e350ee127b4e230160eab42eeadfc5021bb66e0.tar.gz
wabt-6e350ee127b4e230160eab42eeadfc5021bb66e0.tar.bz2
wabt-6e350ee127b4e230160eab42eeadfc5021bb66e0.zip
wasm2c: implement the tail-call proposal (#2272)
Diffstat (limited to 'wasm2c/examples/callback/main.c')
-rw-r--r--wasm2c/examples/callback/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wasm2c/examples/callback/main.c b/wasm2c/examples/callback/main.c
index 8c6f9db0..8d9ab59e 100644
--- a/wasm2c/examples/callback/main.c
+++ b/wasm2c/examples/callback/main.c
@@ -26,7 +26,8 @@ int main(int argc, char** argv) {
*/
wasm_rt_func_type_t fn_type =
wasm2c_callback_get_func_type(1, 0, WASM_RT_I32);
- wasm_rt_funcref_t fn_ref = {fn_type, (wasm_rt_function_ptr_t)print, &inst};
+ wasm_rt_funcref_t fn_ref = {
+ fn_type, (wasm_rt_function_ptr_t)print, {NULL}, &inst};
w2c_callback_set_print_function(&inst, fn_ref);
/* "say_hello" uses the previously installed callback. */