SupportDef: Add B_COUNT_OF to get array element count.

* We implement this in a lot of places in a lot of
  ways. Lets add it to the SupportDef
This commit is contained in:
Alexander von Gluck IV 2014-11-09 14:47:39 -06:00
parent e0923fddba
commit f2b20f8804

View File

@ -202,6 +202,9 @@ extern void* get_stack_frame(void);
}
#endif
/* Count items in an array, count_of is a common define */
#define B_COUNT_OF(a) (sizeof(a) / sizeof(a[0]))
/* Obsolete or discouraged API */
/* use 'true' and 'false' */