doc(runtime-c-api) Improve documentation of wasmer_exports_destroy.

This commit is contained in:
Ivan Enderlin
2020-01-20 15:28:30 +01:00
parent 3022a16ec3
commit 076931de91

View File

@ -212,7 +212,23 @@ pub unsafe extern "C" fn wasmer_export_descriptor_kind(
named_export_descriptor.kind.clone() named_export_descriptor.kind.clone()
} }
/// Frees the memory for the given exports /// Frees the memory for the given exports.
///
/// Check the `wasmer_instance_exports` function to get a complete
/// example.
///
/// If `exports` is a null pointer, this function does nothing.
///
/// Example:
///
/// ```c
/// // Get some exports.
/// wasmer_exports_t *exports = NULL;
/// wasmer_instance_exports(instance, &exports);
///
/// // Destroy the exports.
/// wasmer_exports_destroy(exports);
/// ```
#[allow(clippy::cast_ptr_alignment)] #[allow(clippy::cast_ptr_alignment)]
#[no_mangle] #[no_mangle]
pub extern "C" fn wasmer_exports_destroy(exports: *mut wasmer_exports_t) { pub extern "C" fn wasmer_exports_destroy(exports: *mut wasmer_exports_t) {