FOR_LIST_ELEMENTS convenience macros

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-03-26 19:25:53 +01:00
parent 7c0ab99bd2
commit 42ca71ca47

View file

@ -40,6 +40,8 @@ int EXPORT_FUNC(grub_list_iterate) (grub_list_t head, grub_list_hook_t hook);
void EXPORT_FUNC(grub_list_insert) (grub_list_t *head, grub_list_t item, void EXPORT_FUNC(grub_list_insert) (grub_list_t *head, grub_list_t item,
grub_list_test_t test); grub_list_test_t test);
#define FOR_LIST_ELEMENTS(var, list) for ((var) = (list); (var); (var) = (var)->next)
static inline void * static inline void *
grub_bad_type_cast_real (int line, const char *file) grub_bad_type_cast_real (int line, const char *file)
ATTRIBUTE_ERROR ("bad type cast between incompatible grub types"); ATTRIBUTE_ERROR ("bad type cast between incompatible grub types");