Function wasmer_c_api::wasm_c_api::value::wasm_val_vec_new_uninitialized
source · #[no_mangle]
pub extern "C" fn wasm_val_vec_new_uninitialized(
out: &mut wasm_val_vec_t,
size: usize
)
Expand description
Creates a new uninitialized vector of wasm_val_t
.
Example
int main() {
// Creates an empty vector of `wasm_val_t`.
wasm_val_vec_t vector;
wasm_val_vec_new_uninitialized(&vector, 3);
// Check that it contains 3 items.
assert(vector.size == 3);
// Free it.
wasm_val_vec_delete(&vector);
return 0;
}