From: Sebastian Dröge Date: Sat, 24 Oct 2009 09:58:25 +0000 (+0200) Subject: registry: private is a C++ keyword, don't use it X-Git-Tag: RELEASE-0.10.26~302 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b04f7489bf3998c537e922575897f6377e98ce99;p=platform%2Fupstream%2Fgstreamer.git registry: private is a C++ keyword, don't use it ...otherwise C++ compilers will complain when including gstregistry.h --- diff --git a/gst/gstregistry.c b/gst/gstregistry.c index ee9ef5b..4ca760d 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -220,7 +220,7 @@ gst_registry_init (GstRegistry * registry) { registry->feature_hash = g_hash_table_new (g_str_hash, g_str_equal); registry->basename_hash = g_hash_table_new (g_str_hash, g_str_equal); - registry->private = + registry->priv = G_TYPE_INSTANCE_GET_PRIVATE (registry, GST_TYPE_REGISTRY, GstRegistryPrivate); } @@ -270,14 +270,14 @@ gst_registry_finalize (GObject * object) g_hash_table_destroy (registry->basename_hash); registry->basename_hash = NULL; - if (registry->private->element_factory_list) { + if (registry->priv->element_factory_list) { GST_DEBUG_OBJECT (registry, "Cleaning up cached element factory list"); - gst_plugin_feature_list_free (registry->private->element_factory_list); + gst_plugin_feature_list_free (registry->priv->element_factory_list); } - if (registry->private->typefind_factory_list) { + if (registry->priv->typefind_factory_list) { GST_DEBUG_OBJECT (registry, "Cleaning up cached typefind factory list"); - gst_plugin_feature_list_free (registry->private->typefind_factory_list); + gst_plugin_feature_list_free (registry->priv->typefind_factory_list); } G_OBJECT_CLASS (parent_class)->finalize (object); @@ -457,7 +457,7 @@ gst_registry_remove_features_for_plugin_unlocked (GstRegistry * registry, } f = next; } - registry->private->cookie++; + registry->priv->cookie++; } /** @@ -534,7 +534,7 @@ gst_registry_add_feature (GstRegistry * registry, GstPluginFeature * feature) gst_object_ref_sink (feature); - registry->private->cookie++; + registry->priv->cookie++; GST_OBJECT_UNLOCK (registry); GST_LOG_OBJECT (registry, "emitting feature-added for %s", feature->name); @@ -564,7 +564,7 @@ gst_registry_remove_feature (GstRegistry * registry, GstPluginFeature * feature) GST_OBJECT_LOCK (registry); registry->features = g_list_remove (registry->features, feature); g_hash_table_remove (registry->feature_hash, feature->name); - registry->private->cookie++; + registry->priv->cookie++; GST_OBJECT_UNLOCK (registry); gst_object_unref (feature); } @@ -614,9 +614,9 @@ gst_registry_get_feature_list_or_create (GstRegistry * registry, GList ** previous, guint32 * cookie, GType type) { gboolean res = FALSE; - GstRegistryPrivate *private = registry->private; + GstRegistryPrivate *priv = registry->priv; - if (G_UNLIKELY (!*previous || private->cookie != *cookie)) { + if (G_UNLIKELY (!*previous || priv->cookie != *cookie)) { GstTypeNameData data; if (*previous) @@ -628,7 +628,7 @@ gst_registry_get_feature_list_or_create (GstRegistry * registry, gst_filter_run (registry->features, (GstFilterFunc) gst_plugin_feature_type_name_filter, FALSE, &data); g_list_foreach (*previous, (GFunc) gst_object_ref, NULL); - *cookie = private->cookie; + *cookie = priv->cookie; res = TRUE; } @@ -655,11 +655,11 @@ gst_registry_get_element_factory_list (GstRegistry * registry) GST_OBJECT_LOCK (registry); gst_registry_get_feature_list_or_create (registry, - ®istry->private->element_factory_list, ®istry->private->efl_cookie, + ®istry->priv->element_factory_list, ®istry->priv->efl_cookie, GST_TYPE_ELEMENT_FACTORY); /* Return reffed copy */ - list = gst_plugin_feature_list_copy (registry->private->element_factory_list); + list = gst_plugin_feature_list_copy (registry->priv->element_factory_list); GST_OBJECT_UNLOCK (registry); @@ -674,15 +674,14 @@ gst_registry_get_typefind_factory_list (GstRegistry * registry) GST_OBJECT_LOCK (registry); if (G_UNLIKELY (gst_registry_get_feature_list_or_create (registry, - ®istry->private->typefind_factory_list, - ®istry->private->tfl_cookie, GST_TYPE_TYPE_FIND_FACTORY))) - registry->private->typefind_factory_list = - g_list_sort (registry->private->typefind_factory_list, + ®istry->priv->typefind_factory_list, + ®istry->priv->tfl_cookie, GST_TYPE_TYPE_FIND_FACTORY))) + registry->priv->typefind_factory_list = + g_list_sort (registry->priv->typefind_factory_list, (GCompareFunc) type_find_factory_rank_cmp); /* Return reffed copy */ - list = - gst_plugin_feature_list_copy (registry->private->typefind_factory_list); + list = gst_plugin_feature_list_copy (registry->priv->typefind_factory_list); GST_OBJECT_UNLOCK (registry); diff --git a/gst/gstregistry.h b/gst/gstregistry.h index 946bb4c..e740bf4 100644 --- a/gst/gstregistry.h +++ b/gst/gstregistry.h @@ -63,7 +63,7 @@ struct _GstRegistry { /* hash to speedup _lookup */ GHashTable *basename_hash; - GstRegistryPrivate *private; + GstRegistryPrivate *priv; /*< private >*/ gpointer _gst_reserved[GST_PADDING-3];