PebbleOS v4.47.0-512-g5285d4236
Loading...
Searching...
No Matches
size.h File Reference
#include <stddef.h>
#include <pbl/kernel/compiler.h>

Macros

#define PBL_IS_ARRAY(array)
 Fail the build if the argument is not an array.
 
#define PBL_ARRAY_SIZE(array)   ((size_t)(PBL_IS_ARRAY(array) + sizeof(array) / sizeof((array)[0])))
 Get the number of elements of an array.
 
#define PBL_STATIC_ARRAY_SIZE(type, array)   (sizeof((type[])array) / sizeof(type))
 Get the number of elements of an array literal, as a compile-time constant.
 
#define PBL_SIZEOF_FIELD(type, member)   sizeof(((type *)0)->member)
 Get the size of a structure member without an instance.