Move ff_dynarray_add to lavu and make it public.
This commit is contained in:
@@ -31,20 +31,18 @@ typedef struct AVCodecTag {
|
||||
unsigned int tag;
|
||||
} AVCodecTag;
|
||||
|
||||
void ff_dynarray_add(intptr_t **tab_ptr, int *nb_ptr, intptr_t elem);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define dynarray_add(tab, nb_ptr, elem)\
|
||||
do {\
|
||||
__typeof__(tab) _tab = (tab);\
|
||||
__typeof__(elem) _elem = (elem);\
|
||||
(void)sizeof(**_tab == _elem); /* check that types are compatible */\
|
||||
ff_dynarray_add((intptr_t **)_tab, nb_ptr, (intptr_t)_elem);\
|
||||
av_dynarray_add(_tab, nb_ptr, _elem);\
|
||||
} while(0)
|
||||
#else
|
||||
#define dynarray_add(tab, nb_ptr, elem)\
|
||||
do {\
|
||||
ff_dynarray_add((intptr_t **)(tab), nb_ptr, (intptr_t)(elem));\
|
||||
av_dynarray_add((tab), nb_ptr, (elem));\
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user