adding a document for wasmer_instance_context_get

This commit is contained in:
Yaron Wittenstein 2019-07-31 14:15:16 +03:00
parent 847dd6f65e
commit 351977690b
3 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,7 @@ pub unsafe extern "C" fn wasmer_instantiate(
wasmer_result_t::WASMER_OK
}
/// Extracts the instance's context and returns it.
#[allow(clippy::cast_ptr_alignment)]
#[no_mangle]
pub unsafe extern "C" fn wasmer_instance_context_get(

View File

@ -417,6 +417,9 @@ void *wasmer_instance_context_data_get(const wasmer_instance_context_t *ctx);
*/
void wasmer_instance_context_data_set(wasmer_instance_t *instance, void *data_ptr);
/**
* Extracts the instance's context and returns it.
*/
const wasmer_instance_context_t *wasmer_instance_context_get(wasmer_instance_t *instance);
/**

View File

@ -337,6 +337,7 @@ void *wasmer_instance_context_data_get(const wasmer_instance_context_t *ctx);
/// passed to all imported function for instance.
void wasmer_instance_context_data_set(wasmer_instance_t *instance, void *data_ptr);
/// Extracts the instance's context and returns it.
const wasmer_instance_context_t *wasmer_instance_context_get(wasmer_instance_t *instance);
/// Gets the memory within the context at the index `memory_idx`.