[libpeas] Remove unneeded PeasPluginInfo (un)refs



commit 5e27723a788d1742560d878fdee64746d41e97bc
Author: Garrett Regier <garrettregier gmail com>
Date:   Sun Aug 28 00:12:22 2011 -0700

    Remove unneeded PeasPluginInfo (un)refs
    
    Because these are tied to the lifetime of the
    PeasEngine (un)refing them in unneeded.

 libpeas/peas-extension-base.c |   14 +-------------
 libpeas/peas-extension-set.c  |    3 ---
 2 files changed, 1 insertions(+), 16 deletions(-)
---
diff --git a/libpeas/peas-extension-base.c b/libpeas/peas-extension-base.c
index 602a99e..329a25f 100644
--- a/libpeas/peas-extension-base.c
+++ b/libpeas/peas-extension-base.c
@@ -88,7 +88,7 @@ peas_extension_base_set_property (GObject      *object,
   switch (prop_id)
     {
     case PROP_PLUGIN_INFO:
-      extbase->priv->info = g_value_dup_boxed (value);
+      extbase->priv->info = g_value_get_boxed (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -105,24 +105,12 @@ peas_extension_base_init (PeasExtensionBase *extbase)
 }
 
 static void
-peas_extension_base_finalize (GObject *object)
-{
-  PeasExtensionBase *extbase = PEAS_EXTENSION_BASE (object);
-
-  if (extbase->priv->info != NULL)
-    _peas_plugin_info_unref (extbase->priv->info);
-
-  G_OBJECT_CLASS (peas_extension_base_parent_class)->finalize (object);
-}
-
-static void
 peas_extension_base_class_init (PeasExtensionBaseClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   object_class->get_property = peas_extension_base_get_property;
   object_class->set_property = peas_extension_base_set_property;
-  object_class->finalize = peas_extension_base_finalize;
 
   g_object_class_install_property (object_class,
                                    PROP_PLUGIN_INFO,
diff --git a/libpeas/peas-extension-set.c b/libpeas/peas-extension-set.c
index ff35b6c..4089ea9 100644
--- a/libpeas/peas-extension-set.c
+++ b/libpeas/peas-extension-set.c
@@ -209,8 +209,6 @@ add_extension (PeasExtensionSet *set,
                                          set->priv->n_parameters,
                                          set->priv->parameters);
 
-/*  peas_plugin_info_ref (info); */
-
   item = (ExtensionItem *) g_slice_new (ExtensionItem);
   item->info = info;
   item->exten = exten;
@@ -225,7 +223,6 @@ remove_extension_item (PeasExtensionSet *set,
 {
   g_signal_emit (set, signals[EXTENSION_REMOVED], 0, item->info, item->exten);
 
-/*  peas_plugin_info_unref (item->info); */
   g_object_unref (item->exten);
 
   g_slice_free (ExtensionItem, item);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]