ListPtrAt
ListPtrAt
Description
Pointer to data in node at given index in given list
Parameters
| Name | Direction | Description |
|---|---|---|
l |
in | List to get data from. |
idx |
in | Index to get data at. |
Success
Pointer to data from node in list at given index
Failure
NULL
Usage example (Cross-references)
Usage examples (Cross-references)
- In
ListInt.c:185:
uint16_t idx = extract_u16(data, offset, size);
if (idx < list->length) {
volatile i32 *ptr = ListPtrAt(list, idx);
if (ptr) {
volatile i32 val = *ptr;- In
Access.h:35:
#ifdef __cplusplus
# define ListAt(l, idx) (ListPtrAt((l), (idx)) ? *ListPtrAt((l), (idx)) : (LIST_DATA_TYPE(l) {0}))
#else
///
- In
Access.h:48:
/// FAILURE: Emtpy object.
///
# define ListAt(l, idx) (ListPtrAt((l), (idx)) ? *ListPtrAt((l), (idx)) : ((LIST_DATA_TYPE(l)) {0}))
#endif
Last updated on