diff options
Diffstat (limited to 'src/localconsts.h')
-rw-r--r-- | src/localconsts.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/localconsts.h b/src/localconsts.h index ad0744246..8de67449d 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -24,6 +24,11 @@ #define ENABLEDEBUGLOG 1 +/* + * compile-time number of array elements + */ +#define NUM_ELEMENTS(array) (sizeof(array) / sizeof(array[0])) + #ifndef GCC_VERSION #define GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ |