gst/gstutils.h: Add G_UNLIKELY to our boilerplate to optimise the 'already registered the type' case. (Closes: #33519...

Original commit message from CVS:
* gst/gstutils.h:
Add G_UNLIKELY to our boilerplate to optimise the 'already registered
the type' case. (Closes: #335195 for now). In the future, when we
depend on GLib 2.10, we could also intern the type name using
g_intern_static_string()
This commit is contained in:
Jan Schmidt 2006-03-20 16:45:15 +00:00
parent f35fc7a902
commit 3bf7e221ad
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2006-03-20 Jan Schmidt <thaytan@mad.scientist.com>
* gst/gstutils.h:
Add G_UNLIKELY to our boilerplate to optimise the 'already registered
the type' case. (Closes: #335195 for now). In the future, when we
depend on GLib 2.10, we could also intern the type name using
g_intern_static_string()
2006-03-20 Wim Taymans <wim@fluendo.com> 2006-03-20 Wim Taymans <wim@fluendo.com>
* gst/gstbin.c: (gst_bin_handle_message_func), * gst/gstbin.c: (gst_bin_handle_message_func),

View file

@ -116,7 +116,7 @@ GType \
type_as_function ## _get_type (void) \ type_as_function ## _get_type (void) \
{ \ { \
static GType object_type = 0; \ static GType object_type = 0; \
if (object_type == 0) { \ if (G_UNLIKELY (object_type == 0)) { \
static const GTypeInfo object_info = { \ static const GTypeInfo object_info = { \
sizeof (type ## Class), \ sizeof (type ## Class), \
type_as_function ## _base_init, \ type_as_function ## _base_init, \