diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2011-05-09 12:52:55 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2011-05-09 12:52:55 +0000 |
commit | 17f6352c2e220fdfd23de2712cdd02154b3bd4cb (patch) | |
tree | 6468c238f2cd42d8dfa5c8c4b222f405c53dce41 /epan/ftypes | |
parent | 0edf3eafa9aaf3ed67336c150423403c56c6cf5c (diff) |
Convert SLAB_-s, to sl_-API.
svn path=/trunk/; revision=37030
Diffstat (limited to 'epan/ftypes')
-rw-r--r-- | epan/ftypes/ftypes.c | 5 | ||||
-rw-r--r-- | epan/ftypes/ftypes.h | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/epan/ftypes/ftypes.c b/epan/ftypes/ftypes.c index 35e73aeb74..ec22cb2f8f 100644 --- a/epan/ftypes/ftypes.c +++ b/epan/ftypes/ftypes.c @@ -34,7 +34,8 @@ static ftype_t* type_list[FT_NUM_TYPES]; /* Space for quickly allocating/de-allocating fvalue_t's */ -SLAB_FREE_LIST_DEFINE(fvalue_t) +struct ws_memory_slab fvalue_t_slab = + WS_MEMORY_SLAB_INIT(fvalue_t, 128); /* Initialize the ftype module. */ void @@ -203,7 +204,7 @@ fvalue_new(ftenum_t ftype) ftype_t *ft; FvalueNewFunc new_value; - SLAB_ALLOC(fv, fvalue_t); + fv = sl_alloc(&fvalue_t_slab); FTYPE_LOOKUP(ftype, ft); fv->ftype = ft; diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h index 994fe0f28e..22cc5f379c 100644 --- a/epan/ftypes/ftypes.h +++ b/epan/ftypes/ftypes.h @@ -27,7 +27,7 @@ #define FTYPES_H #include <glib.h> -#include "../slab.h" +#include "../emem.h" /* field types */ enum ftenum { @@ -255,14 +255,10 @@ fvalue_new(ftenum_t ftype); void fvalue_init(fvalue_t *fv, ftenum_t ftype); - -/* Define type needed for the fvalue_t free list. */ -SLAB_ITEM_TYPE_DEFINE(fvalue_t) - /* Free all memory used by an fvalue_t. With MSVC and a * libwireshark.dll, we need a special declaration. */ -WS_VAR_IMPORT SLAB_FREE_LIST_DECLARE(fvalue_t) +WS_VAR_IMPORT struct ws_memory_slab fvalue_t_slab; #define FVALUE_CLEANUP(fv) \ @@ -277,7 +273,7 @@ WS_VAR_IMPORT SLAB_FREE_LIST_DECLARE(fvalue_t) #define FVALUE_FREE(fv) \ { \ FVALUE_CLEANUP(fv) \ - SLAB_FREE(fv, fvalue_t); \ + sl_free(&fvalue_t_slab, fv); \ } |