Commit 1e0128c4 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

configure.ac: Require GLib 2.12.

Original commit message from CVS:
* configure.ac:
Require GLib 2.12.
* gst/glib-compat-private.h:
* gst/gstcaps.c: (gst_caps_new_empty), (_gst_caps_free):
* gst/gstclock.c: (gst_clock_entry_new), (_gst_clock_id_free):
Unconditionally use GSlice for allocation.
* gst/gstpoll.c: (gst_poll_new), (gst_poll_free):
* gst/gstsegment.c: (gst_segment_new), (gst_segment_free):
* gst/gststructure.c: (gst_structure_id_empty_new_with_size),
(gst_structure_free):
Use GSlice for allocation.
parent 91ba9427
2008-04-01 Sebastian Dröge <slomo@circular-chaos.org>
* configure.ac:
Require GLib 2.12.
* gst/glib-compat-private.h:
* gst/gstcaps.c: (gst_caps_new_empty), (_gst_caps_free):
* gst/gstclock.c: (gst_clock_entry_new), (_gst_clock_id_free):
Unconditionally use GSlice for allocation.
* gst/gstpoll.c: (gst_poll_new), (gst_poll_free):
* gst/gstsegment.c: (gst_segment_new), (gst_segment_free):
* gst/gststructure.c: (gst_structure_id_empty_new_with_size),
(gst_structure_free):
Use GSlice for allocation.
2008-04-01 Sebastian Dröge <slomo@circular-chaos.org>
* gst/parse/Makefile.am:
......
......@@ -471,8 +471,9 @@ LIBS="$save_libs"
dnl *** checks for dependency libraries ***
dnl GLib
GLIB_REQ=2.12
AG_GST_GLIB_CHECK([2.8])
AG_GST_GLIB_CHECK([$GLIB_REQ])
dnl FIXME: 0.11: Guess we need to keep this around until 0.11
GST_HAVE_GLIB_2_8_DEFINE="#define GST_HAVE_GLIB_2_8 1"
......
......@@ -14,9 +14,4 @@ G_BEGIN_DECLS
/* adaptations */
/* FIXME: remove once we depend on GLib 2.10 */
#if (!GLIB_CHECK_VERSION (2, 10, 0))
#define g_intern_string(s) g_quark_to_string(g_quark_from_string(s))
#endif
G_END_DECLS
......@@ -91,14 +91,6 @@
#define IS_WRITABLE(caps) \
(g_atomic_int_get (&(caps)->refcount) == 1)
#if GLIB_CHECK_VERSION (2, 10, 0)
#define ALLOC_CAPS() g_slice_new (GstCaps)
#define FREE_CAPS(caps) g_slice_free (GstCaps, caps)
#else
#define ALLOC_CAPS() g_new (GstCaps, 1)
#define FREE_CAPS(caps) g_free (caps)
#endif
/* lock to protect multiple invocations of static caps to caps conversion */
G_LOCK_DEFINE_STATIC (static_caps_lock);
......@@ -139,7 +131,7 @@ gst_caps_get_type (void)
GstCaps *
gst_caps_new_empty (void)
{
GstCaps *caps = ALLOC_CAPS ();
GstCaps *caps = g_slice_new (GstCaps);
caps->type = GST_TYPE_CAPS;
caps->refcount = 1;
......@@ -309,7 +301,7 @@ _gst_caps_free (GstCaps * caps)
#ifdef DEBUG_REFCOUNT
GST_CAT_LOG (GST_CAT_CAPS, "freeing caps %p", caps);
#endif
FREE_CAPS (caps);
g_slice_free (GstCaps, caps);
}
/**
......
......@@ -116,14 +116,6 @@
static GstAllocTrace *_gst_clock_entry_trace;
#endif
#if GLIB_CHECK_VERSION (2, 10, 0)
#define ALLOC_ENTRY() g_slice_new (GstClockEntry)
#define FREE_ENTRY(entry) g_slice_free (GstClockEntry, entry)
#else
#define ALLOC_ENTRY() g_new (GstClockEntry, 1)
#define FREE_ENTRY(entry) g_free (entry)
#endif
/* #define DEBUGGING_ENABLED */
#define DEFAULT_STATS FALSE
......@@ -162,7 +154,7 @@ gst_clock_entry_new (GstClock * clock, GstClockTime time,
{
GstClockEntry *entry;
entry = ALLOC_ENTRY ();
entry = g_slice_new (GstClockEntry);
#ifndef GST_DISABLE_TRACE
gst_alloc_trace_new (_gst_clock_entry_trace, entry);
#endif
......@@ -211,7 +203,7 @@ _gst_clock_id_free (GstClockID id)
#ifndef GST_DISABLE_TRACE
gst_alloc_trace_free (_gst_clock_entry_trace, id);
#endif
FREE_ENTRY (id);
g_slice_free (GstClockEntry, id);
}
/**
......
......@@ -462,7 +462,7 @@ gst_poll_new (gboolean controllable)
{
GstPoll *nset;
nset = g_new0 (GstPoll, 1);
nset = g_slice_new0 (GstPoll);
nset->lock = g_mutex_new ();
#ifndef G_OS_WIN32
nset->mode = GST_POLL_MODE_AUTO;
......@@ -530,7 +530,7 @@ gst_poll_free (GstPoll * set)
g_array_free (set->active_fds, TRUE);
g_array_free (set->fds, TRUE);
g_mutex_free (set->lock);
g_free (set);
g_slice_free (GstPoll, set);
}
/**
......
......@@ -121,7 +121,7 @@ gst_segment_new (void)
{
GstSegment *result;
result = g_new0 (GstSegment, 1);
result = g_slice_new0 (GstSegment);
gst_segment_init (result, GST_FORMAT_UNDEFINED);
return result;
......@@ -136,7 +136,7 @@ gst_segment_new (void)
void
gst_segment_free (GstSegment * segment)
{
g_free (segment);
g_slice_free (GstSegment, segment);
}
/**
......
......@@ -113,7 +113,7 @@ gst_structure_id_empty_new_with_size (GQuark quark, guint prealloc)
{
GstStructure *structure;
structure = g_new0 (GstStructure, 1);
structure = g_slice_new0 (GstStructure);
structure->type = gst_structure_get_type ();
structure->name = quark;
structure->fields =
......@@ -330,7 +330,7 @@ gst_structure_free (GstStructure * structure)
#ifdef USE_POISONING
memset (structure, 0xff, sizeof (GstStructure));
#endif
g_free (structure);
g_slice_free (GstStructure, structure);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment