|
PebbleOS v4.47.0-512-g5285d4236
|
Structure access helpers. More...
Macros | |
| #define | PBL_NULL_SAFE_FIELD_ACCESS(struct_ptr, field_name, default_value) ((struct_ptr) ? ((struct_ptr)->field_name) : (default_value)) |
| Read a structure field through a pointer that may be NULL. | |
Structure access helpers.
| #define PBL_NULL_SAFE_FIELD_ACCESS | ( | struct_ptr, | |
| field_name, | |||
| default_value | |||
| ) | ((struct_ptr) ? ((struct_ptr)->field_name) : (default_value)) |
Read a structure field through a pointer that may be NULL.
| struct_ptr | Pointer to the structure, evaluated twice. |
| field_name | Field to read. |
| default_value | Value when struct_ptr is NULL. |
struct_ptr->field_name, or default_value.