gst/gstvalue.c: Reorganize some more, be more conservative with the GST_TYPE_ARRAY not being fixed and inline the tri...

Original commit message from CVS:
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
Reorganize some more, be more conservative with the GST_TYPE_ARRAY not
being fixed and inline the trivial check.
This commit is contained in:
Wim Taymans 2008-11-06 15:37:16 +00:00
parent 18aeb9a41e
commit 7f987200b5
2 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2008-11-06 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
Reorganize some more, be more conservative with the GST_TYPE_ARRAY not
being fixed and inline the trivial check.
2008-11-06 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstcaps.c: (gst_caps_copy), (_gst_caps_free),

View file

@ -157,8 +157,7 @@ gst_type_is_fixed (GType type)
}
/* our fundamental types that are certainly not fixed */
if (type == GST_TYPE_INT_RANGE || type == GST_TYPE_DOUBLE_RANGE ||
type == GST_TYPE_LIST || type == GST_TYPE_FRACTION_RANGE ||
type == GST_TYPE_ARRAY) {
type == GST_TYPE_LIST || type == GST_TYPE_FRACTION_RANGE) {
return FALSE;
}
/* other (boxed) types that are fixed */
@ -3342,8 +3341,10 @@ gst_value_is_fixed (const GValue * value)
{
GType type = G_VALUE_TYPE (value);
if (gst_type_is_fixed (type))
/* the most common types are just basic plain glib types */
if (type <= G_TYPE_MAKE_FUNDAMENTAL (G_TYPE_RESERVED_GLIB_LAST)) {
return TRUE;
}
if (type == GST_TYPE_ARRAY) {
gint size, n;
@ -3358,8 +3359,7 @@ gst_value_is_fixed (const GValue * value)
}
return TRUE;
}
return FALSE;
return gst_type_is_fixed (type);
}
/************