Say "memory" instead of "__wasi_memory" in error messages.
While the "__wasi_memory" name is something we considered, the name currently being used for the memory exported to WASI is "memory", so adjust the error message accordingly.
This commit is contained in:
@@ -44,11 +44,11 @@ unsafe fn decode_ptr(
|
|||||||
// Ok, translate the address.
|
// Ok, translate the address.
|
||||||
Ok((((*definition).base as usize) + (ptr as usize)) as *mut u8)
|
Ok((((*definition).base as usize) + (ptr as usize)) as *mut u8)
|
||||||
}
|
}
|
||||||
// No export named "__wasi_memory", or the export isn't a memory.
|
// No export named "memory", or the export isn't a memory.
|
||||||
// FIXME: Is EINVAL the best code here?
|
// FIXME: Is EINVAL the best code here?
|
||||||
x => {
|
x => {
|
||||||
println!(
|
println!(
|
||||||
"!!! no export named __wasi_memory, or the export isn't a mem: {:?}",
|
"!!! no export named \"memory\", or the export isn't a mem: {:?}",
|
||||||
x
|
x
|
||||||
);
|
);
|
||||||
Err(host::__WASI_EINVAL as host::__wasi_errno_t)
|
Err(host::__WASI_EINVAL as host::__wasi_errno_t)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ fn get_memory(vmctx: &mut VMContext) -> Result<&mut [u8], host::__wasi_errno_t>
|
|||||||
)),
|
)),
|
||||||
x => {
|
x => {
|
||||||
println!(
|
println!(
|
||||||
"!!! no export named __wasi_memory, or the export isn't a mem: {:?}",
|
"!!! no export named \"memory\", or the export isn't a mem: {:?}",
|
||||||
x
|
x
|
||||||
);
|
);
|
||||||
Err(host::__WASI_EINVAL)
|
Err(host::__WASI_EINVAL)
|
||||||
|
|||||||
Reference in New Issue
Block a user