Function tari_wallet_ffi::byte_vector_create [−][src]
#[no_mangle]pub unsafe extern "C" fn byte_vector_create(
byte_array: *const c_uchar,
element_count: c_uint,
error_out: *mut c_int
) -> *mut ByteVector
-------------------------------------------------------------------------------------------- /// -------------------------------- ByteVector ------------------------------------------------ /// Creates a ByteVector
Arguments
byte_array
- The pointer to the byte array
element_count
- The number of elements in byte_array
error_out
- Pointer to an int which will be modified to an error code should one occur, may not be null. Functions
as an out parameter.
Returns
*mut ByteVector
- Pointer to the created ByteVector. Note that it will be ptr::null_mut()
if the byte_array pointer was null or if the elements in the byte_vector don't match
element_count when it is created
Safety
The byte_vector_destroy
function must be called when finished with a ByteVector to prevent a memory leak