aboutsummaryrefslogtreecommitdiff
path: root/cmdutils.h
diff options
context:
space:
mode:
authorMichael Niedermayer2012-12-19 22:03:54 +0100
committerMichael Niedermayer2012-12-19 22:04:03 +0100
commit330983b728cceaf8f18557f23e333375a76f1a73 (patch)
treececbaa72dd42c52833e8a1b57fdc018eb357cebd /cmdutils.h
parentf61498e1dfbac9f07f826340c00f9caf7235766c (diff)
parent10bca66101b79954512cd9d8ee20c3bc4513adf3 (diff)
Merge commit '10bca66101b79954512cd9d8ee20c3bc4513adf3'
* commit '10bca66101b79954512cd9d8ee20c3bc4513adf3': cmdutils: add a macro to simplify grow_array() calls. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.h')
-rw-r--r--cmdutils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmdutils.h b/cmdutils.h
index 931b634f4a..a33e33b5ef 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -427,6 +427,9 @@ FILE *get_preset_file(char *filename, size_t filename_size,
*/
void *grow_array(void *array, int elem_size, int *size, int new_size);
+#define GROW_ARRAY(array, nb_elems)\
+ array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)
+
typedef struct FrameBuffer {
uint8_t *base[4];
uint8_t *data[4];