Expose wmem_list_remove_frame to make it efficient to do pop operations as

wmem_list_remove_frame(wmem_list_tail())

svn path=/trunk/; revision=53088
This commit is contained in:
Evan Huus 2013-11-05 17:28:19 +00:00
parent 1051504005
commit d04079eedc
2 changed files with 10 additions and 0 deletions

View File

@ -91,6 +91,12 @@ wmem_list_remove(wmem_list_t *list, void *data)
return;
}
wmem_list_remove_frame(list, frame);
}
void
wmem_list_remove_frame(wmem_list_t *list, wmem_list_frame_t *frame)
{
if (frame->prev) {
frame->prev->next = frame->next;
}

View File

@ -78,6 +78,10 @@ WS_DLL_PUBLIC
void
wmem_list_remove(wmem_list_t *list, void *data);
WS_DLL_PUBLIC
void
wmem_list_remove_frame(wmem_list_t *list, wmem_list_frame_t *frame);
WS_DLL_PUBLIC
void
wmem_list_prepend(wmem_list_t *list, void *data);