Add wasm_runtime_get_module_package_type() and wasm_runtime_get_file_package_type() (#3600)
wasm_runtime_get_file_package_type() is the counterpart of get_file_package_type(). See discussion in #3595.
This commit is contained in:
@ -871,6 +871,22 @@ get_package_type(const uint8 *buf, uint32 size)
|
||||
return Package_Type_Unknown;
|
||||
}
|
||||
|
||||
PackageType
|
||||
wasm_runtime_get_file_package_type(const uint8 *buf, uint32 size)
|
||||
{
|
||||
return get_package_type(buf, size);
|
||||
}
|
||||
|
||||
PackageType
|
||||
wasm_runtime_get_module_package_type(WASMModuleCommon *module)
|
||||
{
|
||||
if (!module) {
|
||||
return Package_Type_Unknown;
|
||||
}
|
||||
|
||||
return module->module_type;
|
||||
}
|
||||
|
||||
#if WASM_ENABLE_AOT != 0
|
||||
static uint8 *
|
||||
align_ptr(const uint8 *p, uint32 b)
|
||||
|
||||
Reference in New Issue
Block a user