VecPushBackArrL
- Macro
- October 8, 2025
Table of Contents
VecPushBackArrL
VecPushBackArrL
Description
Push a complete array into this vector, with L-value semantics.
Note
Ownership trasfer takes place if vector is not creating it’s own copy of items.
Parameters
Name | Direction | Description |
---|---|---|
v | in,out | Vector to insert array items into. |
arr | in | Array to be inserted. |
count | in | Number (non-zero) of items in array. |
Success
v
Failure
Does not return on failure
Usage example (Cross-references)
// Test VecPushBackArrL
VecPushBackArrL(&vec, arr, 3);
// Check vector length
// Test VecPushBackArrL
VecPushBackArrL(&vec, items, 3);
// Check that all items were memset to 0
- In
Vec.Insert.c:415
:
// Test array operations
int arr[] = {40, 50, 60};
VecPushBackArrL(&vec, arr, 3);
// Check that array elements are memset to 0
- In
Insert.h:429
:
/// FAILURE : Does not return on failure
///
#define VecPushBackArr(v, arr, count) VecPushBackArrL((v), (arr), (count))
///
- In
Insert.h:538
:
do { \
if ((v2)->data) { \
VecPushBackArrL((v), (v2)->data, (v2)->length); \
if (!(v)->copy_init && (v2)->data) { \
free((v2)->data); \