Wrapper ARRAY_SIZE macro into ifndef

This commit is contained in:
Sergey Lyubka 2014-08-22 17:54:40 +01:00
parent 1c59641398
commit 4e9adb59f3

5
slre.c
View File

@ -25,9 +25,12 @@
#define MAX_BRANCHES 100
#define MAX_BRACKETS 100
#define ARRAY_SIZE(ar) (int) (sizeof(ar) / sizeof((ar)[0]))
#define FAIL_IF(condition, error_code) if (condition) return (error_code)
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(ar) (int) (sizeof(ar) / sizeof((ar)[0]))
#endif
#ifdef SLRE_DEBUG
#define DBG(x) printf x
#else