R
Ravi Uday
Hi,
Can anybody explain this..
#define LIST_DESTROY(a) list_destroy(a)
#define LIST_ENQUEUE(a, b, c) list_enqueue(a,b,c)
#define LIST_REMOVE(a, b, c) list_remove(a,b,c)
etc...
#define LIST_DESTROY(a) NULL
#define LIST_ENQUEUE(a, b, c) NULL
#define LIST_REMOVE(a, b, c) NULL
#define LIST_HEAD_ELEMENT(a) NULL
#define LIST_GET_DATA(a) NULL
#define LIST_NEXT_ELEMENT(a) NULL
#define LIST_EMPTY(a) NULL
#define FOR_ALL_DATA_IN_LIST(__list, __element, __data) \
for (__element = LIST_HEAD_ELEMENT(__list), \
__data = LIST_GET_DATA(__element); \
__element != NULL; \
__element = LIST_NEXT_ELEMENT(__element), \
__data = LIST_GET_DATA(__element))
Though the name of the MACRO is self-explanatory what i dont understand is
the second list of #define's - why are they defined as NULL
Thanks,
- Ravi
Can anybody explain this..
#define LIST_DESTROY(a) list_destroy(a)
#define LIST_ENQUEUE(a, b, c) list_enqueue(a,b,c)
#define LIST_REMOVE(a, b, c) list_remove(a,b,c)
etc...
#define LIST_DESTROY(a) NULL
#define LIST_ENQUEUE(a, b, c) NULL
#define LIST_REMOVE(a, b, c) NULL
#define LIST_HEAD_ELEMENT(a) NULL
#define LIST_GET_DATA(a) NULL
#define LIST_NEXT_ELEMENT(a) NULL
#define LIST_EMPTY(a) NULL
#define FOR_ALL_DATA_IN_LIST(__list, __element, __data) \
for (__element = LIST_HEAD_ELEMENT(__list), \
__data = LIST_GET_DATA(__element); \
__element != NULL; \
__element = LIST_NEXT_ELEMENT(__element), \
__data = LIST_GET_DATA(__element))
Though the name of the MACRO is self-explanatory what i dont understand is
the second list of #define's - why are they defined as NULL
Thanks,
- Ravi