mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
dynarray: Change AV_ to FF_ for AV_DYNARRAY_ADD
The header is not installed and the macro isn't used outside libavutil, so it is obviously privat to libavutil. Make the name reflect that.
This commit is contained in:
parent
c9ae8be5a8
commit
04da20e58f
@ -42,7 +42,7 @@
|
||||
* array and size are not changed; the statement can end
|
||||
* with a return or a goto
|
||||
*/
|
||||
#define AV_DYNARRAY_ADD(av_size_max, av_elt_size, av_array, av_size, \
|
||||
#define FF_DYNARRAY_ADD(av_size_max, av_elt_size, av_array, av_size, \
|
||||
av_success, av_failure) \
|
||||
do { \
|
||||
size_t av_size_new = (av_size); \
|
||||
|
@ -312,7 +312,7 @@ int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem)
|
||||
void **tab;
|
||||
memcpy(&tab, tab_ptr, sizeof(tab));
|
||||
|
||||
AV_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, {
|
||||
FF_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, {
|
||||
tab[*nb_ptr] = elem;
|
||||
memcpy(tab_ptr, &tab, sizeof(tab));
|
||||
}, {
|
||||
@ -326,7 +326,7 @@ void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem)
|
||||
void **tab;
|
||||
memcpy(&tab, tab_ptr, sizeof(tab));
|
||||
|
||||
AV_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, {
|
||||
FF_DYNARRAY_ADD(INT_MAX, sizeof(*tab), tab, *nb_ptr, {
|
||||
tab[*nb_ptr] = elem;
|
||||
memcpy(tab_ptr, &tab, sizeof(tab));
|
||||
}, {
|
||||
@ -340,7 +340,7 @@ void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
|
||||
{
|
||||
uint8_t *tab_elem_data = NULL;
|
||||
|
||||
AV_DYNARRAY_ADD(INT_MAX, elem_size, *tab_ptr, *nb_ptr, {
|
||||
FF_DYNARRAY_ADD(INT_MAX, elem_size, *tab_ptr, *nb_ptr, {
|
||||
tab_elem_data = (uint8_t *)*tab_ptr + (*nb_ptr) * elem_size;
|
||||
if (elem_data)
|
||||
memcpy(tab_elem_data, elem_data, elem_size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user