* Usage: List* list_new(<Type> type)
*/
#define list_new(type) \
-{ \
- _list_new(sizeof(type)); \
-}
+ _list_new(sizeof(type))
/**
* @brief Copy constructor (shallow copy, ok for basic types).
*/
#define list_set(list, listCell, data) \
{ \
- typeof((data)) tmp = data; \
+ typeof(data) tmp = data; \
_list_set(list, listCell, &tmp); \
}
*/
#define list_insert_before(list, listCell, data) \
{ \
- typeof((data)) tmp = data; \
+ typeof(data) tmp = data; \
_list_insert_before(list, listCell, &tmp); \
}
*/
#define list_insert_after(list, listCell, data) \
{ \
- typeof((data)) tmp = data; \
+ typeof(data) tmp = data; \
_list_insert_after(list, listCell, &tmp); \
}
*/
#define list_insert_front(list, data) \
{ \
- typeof((data)) tmp = data; \
+ typeof(data) tmp = data; \
_list_insert_front(list, &tmp); \
}
*/
#define list_insert_back(list, data) \
{ \
- typeof((data)) tmp = data; \
+ typeof(data) tmp = data; \
_list_insert_back(list, &tmp); \
}