[utils] vector extend method

This commit is contained in:
Al
2015-07-25 01:33:45 -04:00
parent cdb9afddd3
commit e9277d7339

View File

@@ -23,6 +23,11 @@ extern "C" {
static inline void name##_push(name *array, type value) { \
kv_push(type, *array, value); \
} \
static inline void name##_extend(name *array, name *other) { \
for (int i = 0; i < other->n; i++) { \
kv_push(type, *array, *(other->a + i)); \
} \
} \
static inline type name##_pop(name *array) { \
return kv_pop(*array); \
} \