Add a #prefix_list_next() function to lists functions
That may seem useless, but it's not.
This commit is contained in:
parent
867b2f0775
commit
e81bd8de02
|
@ -24,6 +24,11 @@
|
||||||
#define AWESOME_COMMON_LIST_H
|
#define AWESOME_COMMON_LIST_H
|
||||||
|
|
||||||
#define DO_SLIST(type, prefix, dtor) \
|
#define DO_SLIST(type, prefix, dtor) \
|
||||||
|
static inline type *prefix##_list_next(type **list __attribute__ ((unused)), \
|
||||||
|
type *item) \
|
||||||
|
{ \
|
||||||
|
return item->next; \
|
||||||
|
} \
|
||||||
static inline type *prefix##_list_pop(type **list) \
|
static inline type *prefix##_list_pop(type **list) \
|
||||||
{ \
|
{ \
|
||||||
if (*list) \
|
if (*list) \
|
||||||
|
|
Loading…
Reference in New Issue