feat(ll): provide a ds_*ll_init func for consistency
This commit is contained in:
parent
1f7cba9338
commit
4248a678c1
2 changed files with 26 additions and 0 deletions
14
ds.h
14
ds.h
|
|
@ -24,6 +24,20 @@ typedef struct {
|
|||
|
||||
#define ds_ll_foreach(t, ll) for (t *cur = ll; cur; cur = cur->next)
|
||||
|
||||
/**
|
||||
* @brief initialize a new singly linked list
|
||||
*
|
||||
* @return the new linked list
|
||||
*/
|
||||
ds_sll_t *ds_sll_init(void);
|
||||
|
||||
/**
|
||||
* @brief initialize a new doubly linked list
|
||||
*
|
||||
* @return the new linked list
|
||||
*/
|
||||
ds_dll_t *ds_dll_init(void);
|
||||
|
||||
/**
|
||||
* @brief create a new allocated node for a singly linked list
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue