Add wasm_export.h APIs to expose memory type (#3496)
Support to get `wasm_memory_type_t memory_type` from API `wasm_runtime_get_import_type` and `wasm_runtime_get_export_type`, and then get shared flag, initial page cout, maximum page count from the memory_type: ```C bool wasm_memory_type_get_shared(const wasm_memory_type_t memory_type); uint32_t wasm_memory_type_get_init_page_count(const wasm_memory_type_t memory_type); uint32_t wasm_memory_type_get_max_page_count(const wasm_memory_type_t memory_type); ```
This commit is contained in:
@ -512,7 +512,7 @@ typedef struct WASMMemory {
|
||||
uint32 num_bytes_per_page;
|
||||
uint32 init_page_count;
|
||||
uint32 max_page_count;
|
||||
} WASMMemory;
|
||||
} WASMMemory, WASMMemoryType;
|
||||
|
||||
typedef struct WASMTableImport {
|
||||
char *module_name;
|
||||
@ -536,10 +536,7 @@ typedef struct WASMTableImport {
|
||||
typedef struct WASMMemoryImport {
|
||||
char *module_name;
|
||||
char *field_name;
|
||||
uint32 flags;
|
||||
uint32 num_bytes_per_page;
|
||||
uint32 init_page_count;
|
||||
uint32 max_page_count;
|
||||
WASMMemoryType mem_type;
|
||||
#if WASM_ENABLE_MULTI_MODULE != 0
|
||||
WASMModule *import_module;
|
||||
WASMMemory *import_memory_linked;
|
||||
|
||||
Reference in New Issue
Block a user