/* * Copyright (C) 2019 Intel Corporation. All rights reserved. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef _NATIVE_INTERFACE_H_ #define _NATIVE_INTERFACE_H_ /* Note: the bh_plaform.h is the only head file separately implemented by both [app] and [native] worlds */ #include "bh_platform.h" #include "wasm_export.h" #define get_module_inst(exec_env) \ wasm_runtime_get_module_inst(exec_env) #define validate_app_addr(offset, size) \ wasm_runtime_validate_app_addr(module_inst, offset, size) #define validate_app_str_addr(offset) \ wasm_runtime_validate_app_str_addr(module_inst, offset) #define addr_app_to_native(offset) \ wasm_runtime_addr_app_to_native(module_inst, offset) #define addr_native_to_app(ptr) \ wasm_runtime_addr_native_to_app(module_inst, ptr) #define module_malloc(size) \ wasm_runtime_module_malloc(module_inst, size) #define module_free(offset) \ wasm_runtime_module_free(module_inst, offset) /*char *wa_strdup(const char *);*/ #endif /* end of _NATIVE_INTERFACE_H */