vt_set_ptr 3 2016-02-28 genvector manual

NAME

vt_set_ptr - overwrite an element

SYNPOSIS

int vt_set_ptr(vt_t *vect, vt_size_t idx, vt_elem_t *src)

DESCRIPTION

vt_set_ptr performs the same action as vt_set but gets src as a pointer which is preferred if vt_elem_t is large.

Note: vt_t and the vt_ prefix are type-dependant, see vt_t(7).

Arguments:
vect A vector already initialized using vt_init.
idx The index of the element to be overwritten.
src Data which the addressed element is overwritten with.

RETURN VALUE

Returns 0 on success, -1 on failure. Error conditions include memory allocation or user supplied elem copy function failure.

SEE ALSO

vt_set_ptr 3 2016-02-28 genvector manual