summaryrefslogtreecommitdiff
path: root/wasm2c/examples/callback/main.c
diff options
context:
space:
mode:
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. */