add pointer versions of add and remove all in ptk list
This commit is contained in:
parent
b95ddb45a0
commit
af3066ab7b
1 changed files with 4 additions and 0 deletions
|
@ -12,10 +12,14 @@
|
|||
|
||||
#define PTK_LIST_ADD_ALL(T, list, ...) _add_PtkList((void **)&list.data, &list.size, &list.allocated, (T []) __VA_ARGS__, sizeof((T []) __VA_ARGS__) / sizeof(T), sizeof(T))
|
||||
|
||||
#define PTK_LIST_ADD_ALL_P(T, list, p_elem, elem_count) _add_PtkList((void **)&list.data, &list.size, &list.allocated, p_elem, elem_count, sizeof(T))
|
||||
|
||||
#define PTK_LIST_REMOVE(T, list, elem) _remove_PtkList((void *)list.data, &list.size, &elem, 1, sizeof(T))
|
||||
|
||||
#define PTK_LIST_REMOVE_ALL(T, list, ...) _remove_PtkList((void *)list.data, &list.size, (T []) __VA_ARGS__, sizeof((T []) __VA_ARGS__) / sizeof(T), sizeof(T))
|
||||
|
||||
#define PTK_LIST_REMOVE_ALL_P(T, list, p_elem, elem_count) _remove_PtkList((void *)list.data, &list.size, p_elem, elem_count, sizeof(T))
|
||||
|
||||
#define PTK_LIST_REMOVE_AT(T, list, index) _remove_at_PtkList((void *)list.data, &list.size, index, sizeof(T))
|
||||
|
||||
bool _grow_PtkList(void **data, uint32_t *allocated, size_t element_size);
|
||||
|
|
Loading…
Reference in a new issue