comparison avformat.h @ 3970:c265c84caa81 libavformat

Use __typeof__ instead of GCC-specific typeof keyword. The typeof keyword is disabled by default when building with -std=c99 as it's a GNU extension. ICC supports the __typeof__ keyword as well as typeof. Patch by Diego 'Flameeyes' Petten %flameeyes A gmail P com%
author gpoirier
date Thu, 02 Oct 2008 20:01:13 +0000
parents 8d94741841b2
children 549a09cf23fe
comparison
equal deleted inserted replaced
3969:d3db5ee44053 3970:c265c84caa81
1121 void ff_dynarray_add(unsigned long **tab_ptr, int *nb_ptr, unsigned long elem); 1121 void ff_dynarray_add(unsigned long **tab_ptr, int *nb_ptr, unsigned long elem);
1122 1122
1123 #ifdef __GNUC__ 1123 #ifdef __GNUC__
1124 #define dynarray_add(tab, nb_ptr, elem)\ 1124 #define dynarray_add(tab, nb_ptr, elem)\
1125 do {\ 1125 do {\
1126 typeof(tab) _tab = (tab);\ 1126 __typeof__(tab) _tab = (tab);\
1127 typeof(elem) _elem = (elem);\ 1127 __typeof__(elem) _elem = (elem);\
1128 (void)sizeof(**_tab == _elem); /* check that types are compatible */\ 1128 (void)sizeof(**_tab == _elem); /* check that types are compatible */\
1129 ff_dynarray_add((unsigned long **)_tab, nb_ptr, (unsigned long)_elem);\ 1129 ff_dynarray_add((unsigned long **)_tab, nb_ptr, (unsigned long)_elem);\
1130 } while(0) 1130 } while(0)
1131 #else 1131 #else
1132 #define dynarray_add(tab, nb_ptr, elem)\ 1132 #define dynarray_add(tab, nb_ptr, elem)\