MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / AddToListHead

Function AddToListHead

src/Chain/libraries/glua/glua_structs.cpp:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 }
43
44 void AddToListHead(List* list, ListItem* item) {
45 if (!list || !item) {
46 return;
47 }
48 if (list->head) {
49 list->head->prev = item;
50 }
51 else {
52 list->tail = item;
53 }
54 item->next = list->head;
55 item->prev = NULL;
56 list->head = item;
57 list->size++;
58 }
59
60 ListItem* FirstItem(List* list) {
61 return list->head;

Callers 2

StartTableFunction · 0.85
ProcessCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected