add engine forking
This commit is contained in:
parent
4f36fcd2c1
commit
b1e8e29774
5 changed files with 71 additions and 9 deletions
|
|
@ -62,6 +62,16 @@ HSlist* h_slist_copy(HSlist *slist) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
// like h_slist_pop, but does not deallocate the head node
|
||||
void* h_slist_drop(HSlist *slist) {
|
||||
HSlistNode *head = slist->head;
|
||||
if (!head)
|
||||
return NULL;
|
||||
void* ret = head->elem;
|
||||
slist->head = head->next;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void* h_slist_pop(HSlist *slist) {
|
||||
HSlistNode *head = slist->head;
|
||||
if (!head)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue