Add wasm module global type information APIs (#3406)
Support getting global type from `wasm_runtime_get_import_type` and `wasm_runtime_get_export_type`, and add two APIs: ```C wasm_valkind_t wasm_global_type_get_valkind(const wasm_global_type_t global_type); bool wasm_global_type_get_mutable(const wasm_global_type_t global_type); ```
This commit is contained in:
@ -1161,8 +1161,8 @@ wasm_native_lookup_libc_builtin_global(const char *module_name,
|
||||
while (global_def < global_def_end) {
|
||||
if (!strcmp(global_def->module_name, module_name)
|
||||
&& !strcmp(global_def->global_name, global_name)) {
|
||||
global->type = global_def->type;
|
||||
global->is_mutable = global_def->is_mutable;
|
||||
global->type.val_type = global_def->type;
|
||||
global->type.is_mutable = global_def->is_mutable;
|
||||
global->global_data_linked = global_def->value;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user