Implement register/call native API with raw (unextracted) arguments (#222)
This commit is contained in:
@ -16,15 +16,23 @@ typedef struct NativeSymbol {
|
||||
const char *symbol;
|
||||
void *func_ptr;
|
||||
const char *signature;
|
||||
/* attachment which can be retrieved in native API by
|
||||
calling wasm_runtime_get_function_attachment(exec_env) */
|
||||
void *attachment;
|
||||
} NativeSymbol;
|
||||
|
||||
#define EXPORT_WASM_API(symbol) {#symbol, (void*)symbol, NULL}
|
||||
#define EXPORT_WASM_API2(symbol) {#symbol, (void*)symbol##_wrapper, NULL}
|
||||
#define EXPORT_WASM_API(symbol) {#symbol, (void*)symbol, NULL, NULL}
|
||||
#define EXPORT_WASM_API2(symbol) {#symbol, (void*)symbol##_wrapper, NULL, NULL}
|
||||
|
||||
#define EXPORT_WASM_API_WITH_SIG(symbol, signature) \
|
||||
{#symbol, (void*)symbol, signature}
|
||||
{#symbol, (void*)symbol, signature, NULL}
|
||||
#define EXPORT_WASM_API_WITH_SIG2(symbol, signature) \
|
||||
{#symbol, (void*)symbol##_wrapper, signature}
|
||||
{#symbol, (void*)symbol##_wrapper, signature, NULL}
|
||||
|
||||
#define EXPORT_WASM_API_WITH_ATT(symbol, signature, attachment) \
|
||||
{#symbol, (void*)symbol, signature, attachment}
|
||||
#define EXPORT_WASM_API_WITH_ATT2(symbol, signature, attachment) \
|
||||
{#symbol, (void*)symbol##_wrapper, signature, attachment}
|
||||
|
||||
/**
|
||||
* Get the exported APIs of base lib
|
||||
|
||||
Reference in New Issue
Block a user