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%

Originally committed as revision 15527 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Diego Pettenò 2008-10-02 20:01:13 +00:00 committed by Guillaume Poirier
parent 9aa1cfec1a
commit 72ab9d7f60
1 changed files with 2 additions and 2 deletions

View File

@ -1123,8 +1123,8 @@ void ff_dynarray_add(unsigned long **tab_ptr, int *nb_ptr, unsigned long elem);
#ifdef __GNUC__
#define dynarray_add(tab, nb_ptr, elem)\
do {\
typeof(tab) _tab = (tab);\
typeof(elem) _elem = (elem);\
__typeof__(tab) _tab = (tab);\
__typeof__(elem) _elem = (elem);\
(void)sizeof(**_tab == _elem); /* check that types are compatible */\
ff_dynarray_add((unsigned long **)_tab, nb_ptr, (unsigned long)_elem);\
} while(0)