Merge branch 'master' into fix-runtime-c-api-warnings

This commit is contained in:
Ivan Enderlin
2019-06-14 10:07:53 +02:00
committed by GitHub
2 changed files with 8 additions and 7 deletions

View File

@ -7,6 +7,7 @@ Blocks of changes will separated by version increments.
## **[Unreleased]** ## **[Unreleased]**
- [#494](https://github.com/wasmerio/wasmer/pull/494) Remove deprecated type aliases from libc in the runtime C API - [#494](https://github.com/wasmerio/wasmer/pull/494) Remove deprecated type aliases from libc in the runtime C API
- [#493](https://github.com/wasmerio/wasmer/pull/493) `wasmer_module_instantiate` has better error messages in the runtime C API
- [#474](https://github.com/wasmerio/wasmer/pull/474) Set the install name of the dylib to `@rpath` - [#474](https://github.com/wasmerio/wasmer/pull/474) Set the install name of the dylib to `@rpath`
- [#490](https://github.com/wasmerio/wasmer/pull/490) Add MiddlewareChain and StreamingCompiler to runtime - [#490](https://github.com/wasmerio/wasmer/pull/490) Add MiddlewareChain and StreamingCompiler to runtime
- [#487](https://github.com/wasmerio/wasmer/pull/487) Fix stack offset check in singlepass backend - [#487](https://github.com/wasmerio/wasmer/pull/487) Fix stack offset check in singlepass backend

View File

@ -126,14 +126,14 @@ pub unsafe extern "C" fn wasmer_module_instantiate(
} }
let module = &*(module as *const Module); let module = &*(module as *const Module);
let new_instance = if let Ok(res) = module.instantiate(&import_object) { let new_instance = match module.instantiate(&import_object) {
res Ok(instance) => instance,
} else { Err(error) => {
update_last_error(CApiError { update_last_error(error);
msg: "error instantiating from module".to_string(),
});
return wasmer_result_t::WASMER_ERROR; return wasmer_result_t::WASMER_ERROR;
}
}; };
*instance = Box::into_raw(Box::new(new_instance)) as *mut wasmer_instance_t; *instance = Box::into_raw(Box::new(new_instance)) as *mut wasmer_instance_t;
wasmer_result_t::WASMER_OK wasmer_result_t::WASMER_OK
} }