Add a macro to get the size of an array.

This commit is contained in:
Andreas Schneider 2009-05-06 19:35:21 +02:00
parent 73548e8a16
commit df5a8d6662

View file

@ -84,6 +84,9 @@
/** Get the bigger value */
#define MAX(a,b) ((a) < (b) ? (b) : (a))
/** Get the size of an array */
#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
/**
* }@
*/