mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 13:11:32 +00:00
fix(runtime-c-api) wasmer_instance_call
types matches wasmer_export_func_*_arity
.
The `wasmer_export_func_params_arity` and `wasmer_export_func_returns_arity` functions store the arity in a `uint32_t`. The `wasmer_instance_call` expects `c_int`. There is a type mismatch here. It's not annoying in C or C++, but in some other languages that have bindings to C/C++, it can imply useless casting. This patch changes `wasmer_instance_call` to expect `uint32_t` for `params_len` and `results_len` to match the `wasmer_export_func_*_arity` functions.
This commit is contained in:
@ -125,9 +125,9 @@ pub unsafe extern "C" fn wasmer_instance_call(
|
|||||||
instance: *mut wasmer_instance_t,
|
instance: *mut wasmer_instance_t,
|
||||||
name: *const c_char,
|
name: *const c_char,
|
||||||
params: *const wasmer_value_t,
|
params: *const wasmer_value_t,
|
||||||
params_len: c_int,
|
params_len: uint32_t,
|
||||||
results: *mut wasmer_value_t,
|
results: *mut wasmer_value_t,
|
||||||
results_len: c_int,
|
results_len: uint32_t,
|
||||||
) -> wasmer_result_t {
|
) -> wasmer_result_t {
|
||||||
if instance.is_null() {
|
if instance.is_null() {
|
||||||
update_last_error(CApiError {
|
update_last_error(CApiError {
|
||||||
|
Reference in New Issue
Block a user