diff options
| author | @syxhe <https://t.me/syxhe> | 2025-04-17 21:56:23 -0500 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2025-04-17 21:56:23 -0500 |
| commit | d47f45a5e3e40b48131409071b119b442c78bffc (patch) | |
| tree | 95e95ac5cbf2be1fec5402452d586a3400d90a02 /src/ll-internal.c | |
| parent | 9bd10281119a28323ddd05bd13827bceb553cc56 (diff) | |
Create ll-internal files to maintain opaqueness of linked list while opening it up for reuse
Diffstat (limited to 'src/ll-internal.c')
| -rw-r--r-- | src/ll-internal.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ll-internal.c b/src/ll-internal.c new file mode 100644 index 0000000..1a4fe3c --- /dev/null +++ b/src/ll-internal.c | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #include "ll-internal.h" | ||
| 2 | #include "shared.h" | ||
| 3 | |||
| 4 | dllnode * dllnode_init(void *data, dll_freecb fcb) { | ||
| 5 | dllnode *n = xcalloc(1, sizeof(*n)); | ||
| 6 | n->data = data; | ||
| 7 | n->freecb = fcb; | ||
| 8 | n->prev = NULL; | ||
| 9 | n->next = NULL; | ||
| 10 | |||
| 11 | return n; | ||
| 12 | } \ No newline at end of file | ||
