mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
gst: use #if GLIB_CHECK_VERSION instead of #ifndef GLIBMACRO
for better greppability at the time we bump GLib version requirements.
This commit is contained in:
parent
504f9c7a6c
commit
235910e227
4 changed files with 13 additions and 13 deletions
|
@ -940,11 +940,11 @@ gst_caps_set_simple_valist (GstCaps * caps, const char *field, va_list varargs)
|
|||
g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n");
|
||||
type = GST_TYPE_DATE;
|
||||
}
|
||||
#ifndef G_VALUE_COLLECT_INIT
|
||||
#if GLIB_CHECK_VERSION(2,23,3)
|
||||
G_VALUE_COLLECT_INIT (&value, type, varargs, 0, &err);
|
||||
#else
|
||||
g_value_init (&value, type);
|
||||
G_VALUE_COLLECT (&value, varargs, 0, &err);
|
||||
#else
|
||||
G_VALUE_COLLECT_INIT (&value, type, varargs, 0, &err);
|
||||
#endif
|
||||
if (G_UNLIKELY (err)) {
|
||||
g_critical ("%s", err);
|
||||
|
|
|
@ -388,12 +388,12 @@ gst_child_proxy_set_valist (GstObject * object,
|
|||
if (!gst_child_proxy_lookup (object, name, &target, &pspec))
|
||||
goto not_found;
|
||||
|
||||
#ifndef G_VALUE_COLLECT_INIT
|
||||
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||
G_VALUE_COLLECT (&value, var_args, G_VALUE_NOCOPY_CONTENTS, &error);
|
||||
#else
|
||||
#if GLIB_CHECK_VERSION(2,23,3)
|
||||
G_VALUE_COLLECT_INIT (&value, pspec->value_type, var_args,
|
||||
G_VALUE_NOCOPY_CONTENTS, &error);
|
||||
#else
|
||||
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
|
||||
G_VALUE_COLLECT (&value, var_args, G_VALUE_NOCOPY_CONTENTS, &error);
|
||||
#endif
|
||||
if (error)
|
||||
goto cant_copy;
|
||||
|
|
|
@ -517,11 +517,11 @@ gst_structure_set_valist (GstStructure * structure,
|
|||
g_warning ("Don't use G_TYPE_DATE, use GST_TYPE_DATE instead\n");
|
||||
type = GST_TYPE_DATE;
|
||||
}
|
||||
#ifndef G_VALUE_COLLECT_INIT
|
||||
#if GLIB_CHECK_VERSION(2,23,3)
|
||||
G_VALUE_COLLECT_INIT (&field.value, type, varargs, 0, &err);
|
||||
#else
|
||||
g_value_init (&field.value, type);
|
||||
G_VALUE_COLLECT (&field.value, varargs, 0, &err);
|
||||
#else
|
||||
G_VALUE_COLLECT_INIT (&field.value, type, varargs, 0, &err);
|
||||
#endif
|
||||
if (G_UNLIKELY (err)) {
|
||||
g_critical ("%s", err);
|
||||
|
|
|
@ -957,11 +957,11 @@ gst_tag_list_add_valist (GstTagList * list, GstTagMergeMode mode,
|
|||
g_warning ("unknown tag '%s'", tag);
|
||||
return;
|
||||
}
|
||||
#ifndef G_VALUE_COLLECT_INIT
|
||||
#if GLIB_CHECK_VERSION(2,23,3)
|
||||
G_VALUE_COLLECT_INIT (&value, info->type, var_args, 0, &error);
|
||||
#else
|
||||
g_value_init (&value, info->type);
|
||||
G_VALUE_COLLECT (&value, var_args, 0, &error);
|
||||
#else
|
||||
G_VALUE_COLLECT_INIT (&value, info->type, var_args, 0, &error);
|
||||
#endif
|
||||
if (error) {
|
||||
g_warning ("%s: %s", G_STRLOC, error);
|
||||
|
|
Loading…
Reference in a new issue