mirror of
https://github.com/cesanta/slre.git
synced 2024-11-24 03:15:30 +00:00
Wrapper ARRAY_SIZE macro into ifndef
This commit is contained in:
parent
1c59641398
commit
4e9adb59f3
5
slre.c
5
slre.c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user