doc(c-api) Add the own annotation when necessary.

This commit is contained in:
Ivan Enderlin
2020-11-12 16:51:46 +01:00
parent 3a5fad1ac4
commit 69c23fd78f
3 changed files with 7 additions and 1 deletions

View File

@@ -45,7 +45,11 @@ pub unsafe extern "C" fn wasm_global_copy(global: &wasm_global_t) -> Box<wasm_gl
} }
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn wasm_global_get(global: &wasm_global_t, out: &mut wasm_val_t) { pub unsafe extern "C" fn wasm_global_get(
global: &wasm_global_t,
// own
out: &mut wasm_val_t,
) {
let value = global.inner.get(); let value = global.inner.get();
*out = value.try_into().unwrap(); *out = value.try_into().unwrap();
} }

View File

@@ -60,6 +60,7 @@ pub unsafe extern "C" fn wasm_instance_delete(_instance: Option<Box<wasm_instanc
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn wasm_instance_exports( pub unsafe extern "C" fn wasm_instance_exports(
instance: &wasm_instance_t, instance: &wasm_instance_t,
// own
out: &mut wasm_extern_vec_t, out: &mut wasm_extern_vec_t,
) { ) {
let instance = &instance.inner; let instance = &instance.inner;

View File

@@ -105,6 +105,7 @@ pub unsafe extern "C" fn wasm_module_validate(
#[no_mangle] #[no_mangle]
pub unsafe extern "C" fn wasm_module_exports( pub unsafe extern "C" fn wasm_module_exports(
module: &wasm_module_t, module: &wasm_module_t,
// own
out: &mut wasm_exporttype_vec_t, out: &mut wasm_exporttype_vec_t,
) { ) {
let exports = module let exports = module