summaryrefslogtreecommitdiff
path: root/epan/tvbuff.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2011-07-11 20:32:19 +0000
committerGerald Combs <gerald@wireshark.org>2011-07-11 20:32:19 +0000
commit49b92440deaabb43114479e5b0e6af2c481ca8ac (patch)
tree011c39768a3be7d7d1f63d9d48d1b6e96383fdf0 /epan/tvbuff.c
parent1f923105f8a5c2c7bf82f1187984600ba14ef993 (diff)
downloadwireshark-49b92440deaabb43114479e5b0e6af2c481ca8ac.tar.gz
More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versions
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and reassemble_cleanup() since they were only used for older GLib versions which didn't support GSlices. Assume we always support the "matches" operator. svn path=/trunk/; revision=37978
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r--epan/tvbuff.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index a5d2df3330..0862ccf0e6 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -60,34 +60,6 @@ ensure_contiguous_no_exception(tvbuff_t *tvb, const gint offset, const gint leng
static const guint8*
ensure_contiguous(tvbuff_t *tvb, const gint offset, const gint length);
-#if GLIB_CHECK_VERSION(2,10,0)
-#else
-/* We dole out tvbuff's from this memchunk. */
-static GMemChunk *tvbuff_mem_chunk = NULL;
-#endif
-
-void
-tvbuff_init(void)
-{
-#if GLIB_CHECK_VERSION(2,10,0)
-#else
- if (!tvbuff_mem_chunk)
- tvbuff_mem_chunk = g_mem_chunk_create(tvbuff_t, 20, G_ALLOC_AND_FREE);
-#endif
-}
-
-void
-tvbuff_cleanup(void)
-{
-#if GLIB_CHECK_VERSION(2,10,0)
-#else
- if (tvbuff_mem_chunk)
- g_mem_chunk_destroy(tvbuff_mem_chunk);
-
- tvbuff_mem_chunk = NULL;
-#endif
-}
-
static void
tvb_init(tvbuff_t *tvb, const tvbuff_type type)
{
@@ -136,11 +108,7 @@ tvb_new(const tvbuff_type type)
{
tvbuff_t *tvb;
-#if GLIB_CHECK_VERSION(2,10,0)
tvb = g_slice_new(tvbuff_t);
-#else
- tvb = g_chunk_new(tvbuff_t, tvbuff_mem_chunk);
-#endif
tvb_init(tvb, type);
@@ -210,11 +178,7 @@ tvb_free(tvbuff_t* tvb)
g_slist_free(tvb->used_in);
}
-#if GLIB_CHECK_VERSION(2,10,0)
g_slice_free(tvbuff_t, tvb);
-#else
- g_chunk_free(tvb, tvbuff_mem_chunk);
-#endif
}
}