changeset 576:481638df1e8b libavutil

Add a macro to get the number of elements in a table.
author benoit
date Wed, 15 Oct 2008 07:24:54 +0000
parents 87b221edc925
children 2fe796dc4c68
files common.h
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/common.h	Sun Oct 12 19:50:24 2008 +0000
+++ b/common.h	Wed Oct 15 07:24:54 2008 +0000
@@ -116,6 +116,7 @@
 #define FFMIN3(a,b,c) FFMIN(FFMIN(a,b),c)
 
 #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
+#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
 
 /* misc math functions */
 extern const uint8_t ff_log2_tab[256];