Add a #prefix_list_next() function to lists functions

That may seem useless, but it's not.
This commit is contained in:
Julien Danjou 2008-03-07 11:26:21 +01:00
parent 867b2f0775
commit e81bd8de02
1 changed files with 115 additions and 110 deletions

View File

@ -24,6 +24,11 @@
#define AWESOME_COMMON_LIST_H
#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) \
{ \
if (*list) \