diff options
author | Evan Huus <eapache@gmail.com> | 2013-11-05 17:28:19 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-11-05 17:28:19 +0000 |
commit | d04079eedc5e7ea91b3ca940ce43d7fa4dd47856 (patch) | |
tree | 96ec6b19f464079baea92b67d45b042ca97578b2 /epan/wmem | |
parent | 105150400530a4b23f1a0d06da0824ca18ff3221 (diff) |
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
Diffstat (limited to 'epan/wmem')
-rw-r--r-- | epan/wmem/wmem_list.c | 6 | ||||
-rw-r--r-- | epan/wmem/wmem_list.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/epan/wmem/wmem_list.c b/epan/wmem/wmem_list.c index f22b817889..df9f07ceee 100644 --- a/epan/wmem/wmem_list.c +++ b/epan/wmem/wmem_list.c @@ -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; } diff --git a/epan/wmem/wmem_list.h b/epan/wmem/wmem_list.h index cb4cecf2f2..65bd0073db 100644 --- a/epan/wmem/wmem_list.h +++ b/epan/wmem/wmem_list.h @@ -80,6 +80,10 @@ 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); WS_DLL_PUBLIC |