mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 07:08:23 +00:00
gst/gstobject.c: Add G_UNLIKELY in type registration.
Original commit message from CVS: * gst/gstobject.c: (gst_object_get_type), (gst_object_ref), (gst_object_unref): Add G_UNLIKELY in type registration. Avoid type check in _ref/_unref since that is also done in glib.
This commit is contained in:
parent
7e972ee6b9
commit
8b87693a69
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
2006-06-12 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstobject.c: (gst_object_get_type), (gst_object_ref),
|
||||
(gst_object_unref):
|
||||
Add G_UNLIKELY in type registration.
|
||||
Avoid type check in _ref/_unref since that is also
|
||||
done in glib.
|
||||
|
||||
2006-06-12 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gsterror.c: (gst_g_error_get_type):
|
||||
|
|
|
@ -166,7 +166,7 @@ gst_object_get_type (void)
|
|||
{
|
||||
static GType gst_object_type = 0;
|
||||
|
||||
if (!gst_object_type) {
|
||||
if (G_UNLIKELY (gst_object_type == 0)) {
|
||||
static const GTypeInfo object_info = {
|
||||
sizeof (GstObjectClass),
|
||||
NULL,
|
||||
|
@ -317,7 +317,7 @@ gst_object_init (GTypeInstance * instance, gpointer g_class)
|
|||
gpointer
|
||||
gst_object_ref (gpointer object)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_OBJECT (object), NULL);
|
||||
g_return_val_if_fail (object != NULL, NULL);
|
||||
|
||||
#ifdef DEBUG_REFCOUNT
|
||||
GST_CAT_LOG_OBJECT (GST_CAT_REFCOUNTING, object, "%p ref %d->%d",
|
||||
|
@ -343,7 +343,7 @@ gst_object_ref (gpointer object)
|
|||
void
|
||||
gst_object_unref (gpointer object)
|
||||
{
|
||||
g_return_if_fail (GST_IS_OBJECT (object));
|
||||
g_return_if_fail (object != NULL);
|
||||
g_return_if_fail (((GObject *) object)->ref_count > 0);
|
||||
|
||||
#ifdef DEBUG_REFCOUNT
|
||||
|
|
Loading…
Reference in a new issue