Commit 9d6bf51a authored by Jean-Paul Saman's avatar Jean-Paul Saman

Add macro for determining array size.

parent e9ad3b33
...@@ -220,6 +220,7 @@ ...@@ -220,6 +220,7 @@
} \ } \
} }
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
/* API */ /* API */
#define DECL_ARRAY(type) struct { \ #define DECL_ARRAY(type) struct { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment