VecPushBackArrL
- Macro
- August 22, 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)
- In
Insert.h:400
:
/// FAILURE : Does not return on failure
///
#define VecPushBackArr(v, arr, count) VecPushBackArrL((v), (arr), (count))
///
- In
Insert.h:514
:
#define VecMergeL(v, v2) \
do { \
VecPushBackArrL((v), (v2)->data, (v2)->length); \
/* Free the source vector's data and reset its state */ \
if ((v2)->data) { \
- 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
// Test VecPushBackArrL
VecPushBackArrL(&vec, arr, 3);
// Check vector length
// Test VecPushBackArrL
VecPushBackArrL(&vec, items, 3);
// Check that all items were memset to 0