mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
Added ARRAY_SIZE(array) macro.
This commit is contained in:
parent
9bc33a54cb
commit
19389f2b82
1 changed files with 4 additions and 0 deletions
|
@ -154,4 +154,8 @@ typedef unsigned char _Bool;
|
|||
# define MAX(x, y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#ifndef ARRAY_SIZE
|
||||
# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue