mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
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:
parent
f35fc7a902
commit
3bf7e221ad
2 changed files with 9 additions and 1 deletions
|
@ -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),
|
||||||
|
|
|
@ -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, \
|
||||||
|
|
Loading…
Reference in a new issue