diff options
Diffstat (limited to 'src/utils/utils.h')
-rw-r--r-- | src/utils/utils.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/utils.h b/src/utils/utils.h index a1e0230..d22a0eb 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -25,4 +25,7 @@ #define UNUSED(x) ((x)=(x)) #endif +/* Useful for iterating over arrays */ +#define N_ELEMENTS(x) sizeof((x)) / sizeof((x)[0]) + #endif |