aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wmem/wmem_stack.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-07-20 20:33:38 +0000
committerEvan Huus <eapache@gmail.com>2013-07-20 20:33:38 +0000
commit6635f5ef67de3307d6173effd179c0c0669f8eab (patch)
tree7f28516005189c92a348cc7a3157ace7a24840a4 /epan/wmem/wmem_stack.h
parent19726260f1aabac6e22b4a2d4e0b0f383c8568b5 (diff)
Replace wmem slist (singly-linked) with wmem list (doubly-linked).
The overhead is not large, and it makes append much faster (O(1) vs O(n)). It also will make a queue easy to add, which I need for a dissector I'm writing... svn path=/trunk/; revision=50744
Diffstat (limited to 'epan/wmem/wmem_stack.h')
-rw-r--r--epan/wmem/wmem_stack.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/wmem/wmem_stack.h b/epan/wmem/wmem_stack.h
index a85c47a3a5..569ae9455a 100644
--- a/epan/wmem/wmem_stack.h
+++ b/epan/wmem/wmem_stack.h
@@ -30,7 +30,7 @@
#include <glib.h>
#include "wmem_core.h"
-#include "wmem_slist.h"
+#include "wmem_list.h"
#ifdef __cplusplus
extern "C" {
@@ -45,10 +45,10 @@ extern "C" {
* @{
*/
-/* Wmem stack is implemented as a simple wrapper over Wmem slist */
-typedef wmem_slist_t wmem_stack_t;
+/* Wmem stack is implemented as a simple wrapper over Wmem list */
+typedef wmem_list_t wmem_stack_t;
-#define wmem_stack_count(X) wmem_slist_count(X)
+#define wmem_stack_count(X) wmem_list_count(X)
WS_DLL_PUBLIC
void *
@@ -62,7 +62,7 @@ WS_DLL_PUBLIC
void
wmem_stack_push(wmem_stack_t *stack, void *data);
-#define wmem_stack_new(ALLOCATOR) wmem_slist_new(ALLOCATOR)
+#define wmem_stack_new(ALLOCATOR) wmem_list_new(ALLOCATOR)
/** @}
* @} */