blob: 26c148e17000dd1590d0e486430b9acacb8e3d03 (
plain) (
tree)
|
|
#ifndef JOVE_LIB_LINKEDLIST_H
#define JOVE_LIB_LINKEDLIST_H 1
#include <stdint.h>
#include <stddef.h>
struct SLLNode {
struct SLLNode *next;
char data[];
};
/*Singly Linked List*/
struct SLinkedList
{
struct SLLNode *head;
struct SLLNode *tail;
size_t obj_size;
size_t count;
};
void sll_new(struct SLinkedList *list, size_t obj_size);
void sll_push(struct SLinkedList *list, void *node);
void *sll_get(struct SLinkedList *list, size_t index);
#endif
|