Added ARRAY_SIZE(array) macro.
This commit is contained in:
parent
9bc33a54cb
commit
19389f2b82
|
@ -154,4 +154,8 @@ typedef unsigned char _Bool;
|
||||||
# define MAX(x, y) ((x) > (y) ? (x) : (y))
|
# define MAX(x, y) ((x) > (y) ? (x) : (y))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef ARRAY_SIZE
|
||||||
|
# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue