aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftypes.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-07-04 02:29:43 +0000
committerGuy Harris <guy@alum.mit.edu>2004-07-04 02:29:43 +0000
commit003ecf68bbb0444adf5aee14613fd77422a5b07c (patch)
treeff6a518065974721889db1b12f3012728520fbd5 /epan/ftypes/ftypes.h
parent456c6cab6646e37a028c7a8ec1bae3a8b6f07f5e (diff)
Instead of using pointer casts in the slab allocator stuff, add a
"SLAB_ITEM_TYPE_DEFINE()" macro to define a union of the type of object for the slab and a pointer to an object of that union type, and use that type for items on the slab allocator free lists; that *should* avoid having the compiler think two pointers to an item being added to or removed from the free list don't point to the same object just because they have different types. svn path=/trunk/; revision=11306
Diffstat (limited to 'epan/ftypes/ftypes.h')
-rw-r--r--epan/ftypes/ftypes.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h
index 3c60b700bb..6796920790 100644
--- a/epan/ftypes/ftypes.h
+++ b/epan/ftypes/ftypes.h
@@ -1,7 +1,7 @@
/* ftypes.h
* Definitions for field types
*
- * $Id: ftypes.h,v 1.34 2004/07/04 00:28:11 guy Exp $
+ * $Id: ftypes.h,v 1.35 2004/07/04 02:29:43 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -231,6 +231,9 @@ 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
* libethereal.dll, we need a special declaration.
*/