Function casper_contract::ext_ffi::casper_get_named_arg [−][src]
pub unsafe extern "C" fn casper_get_named_arg(
name_ptr: *const u8,
name_size: usize,
dest_ptr: *mut u8,
dest_size: usize
) -> i32
Expand description
This function copies the contents of the current runtime buffer into the
wasm memory, beginning at the provided offset. It is intended that this
function be called after a call to load_arg
. It is up to the caller to
ensure that the proper amount of memory is allocated for this write,
otherwise data corruption in the wasm memory may occur due to this call
overwriting some bytes unintentionally. The size of the data which will be
written is returned from the load_arg
call. The bytes which are written
are the those corresponding to the provided argument; it is up to the
developer to know how to attempt to interpret those bytes.
Arguments
name_ptr
- pointer (offset in wasm memory) to the location where serialized argument name is presentname_size
- size of serialized bytes of argument namedest_ptr
- pointer to the location where argument bytes will be copied from the host sidedest_size
- size of destination pointer