add engine forking

This commit is contained in:
Sven M. Hallberg 2013-06-20 11:05:57 +02:00
parent 4f36fcd2c1
commit b1e8e29774
5 changed files with 71 additions and 9 deletions

View file

@ -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)