dl_add()
#
Adds an item to the end of a doubly linked list dl
.
Prototype
int dl_add(dl_list_t *dl, void *item);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the doubly linked list where the item will be added. |
|
|
Pointer to the item to be added to the list. |
Return Value
Returns 0 on success, or -1 if the item already has links.
Notes
The function checks if the item already has links before adding it to the list.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples