PebbleOS
Loading...
Searching...
No Matches
Macros
size.h File Reference

Macros

#define ARRAY_LENGTH(array)   (sizeof((array)) / sizeof((array)[0]))
 Calculate the length of an array, based on the size of the element type.
 
#define STATIC_ARRAY_LENGTH(type, array)   (sizeof((type[])array) / sizeof(type))
 Get the number of elements of an array literal, as a compile-time constant.
 
#define MEMBER_SIZE(type, member)   sizeof(((type *)0)->member)
 Get the size of a structure member without an instance.