From 1b82cccff3045cec5c576ff182ffb33b531eeab0 Mon Sep 17 00:00:00 2001 From: Georgii Rylov Date: Mon, 27 Jan 2025 11:35:56 +0000 Subject: [PATCH] meaning of the return bool type in the callback --- core/iwasm/include/wasm_export.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/iwasm/include/wasm_export.h b/core/iwasm/include/wasm_export.h index ca6020c3a..68e3d509a 100644 --- a/core/iwasm/include/wasm_export.h +++ b/core/iwasm/include/wasm_export.h @@ -867,6 +867,13 @@ wasm_runtime_create_exec_env(wasm_module_inst_t module_inst, WASM_RUNTIME_API_EXTERN void wasm_runtime_destroy_exec_env(wasm_exec_env_t exec_env); + +/** + * Callback to be called on wasm_frame_t*. + * It accepts void* as a context that can be used for closures. + * It returns bool so the iterating can stop when the callback returns false. + * E.g. callback that returns false after processing 100 frames + */ typedef bool (*wasm_frame_callback)(void *, wasm_frame_ptr_t); /**