Fix wasm_runtime_load argument type invalid issue (#1059)
Remove the `const` flag for the first argument `buf` of wasm_runtime_load as it might be modified by runtime for footprint and performance purpose, and update the related functions and document.
This commit is contained in:
@ -753,7 +753,7 @@ register_module_with_null_name(WASMModuleCommon *module_common, char *error_buf,
|
||||
}
|
||||
|
||||
WASMModuleCommon *
|
||||
wasm_runtime_load(const uint8 *buf, uint32 size, char *error_buf,
|
||||
wasm_runtime_load(uint8 *buf, uint32 size, char *error_buf,
|
||||
uint32 error_buf_size)
|
||||
{
|
||||
WASMModuleCommon *module_common = NULL;
|
||||
|
||||
@ -413,7 +413,7 @@ wasm_runtime_is_xip_file(const uint8 *buf, uint32 size);
|
||||
|
||||
/* See wasm_export.h for description */
|
||||
WASM_RUNTIME_API_EXTERN WASMModuleCommon *
|
||||
wasm_runtime_load(const uint8 *buf, uint32 size, char *error_buf,
|
||||
wasm_runtime_load(uint8 *buf, uint32 size, char *error_buf,
|
||||
uint32 error_buf_size);
|
||||
|
||||
/* See wasm_export.h for description */
|
||||
|
||||
Reference in New Issue
Block a user