[gnome-builder] plugins: use fallback to peas now that it supports base classes



commit aadaf38c231181976923e761dbfe85d587e1e834
Author: Christian Hergert <chergert redhat com>
Date:   Sat Aug 26 14:43:14 2017 -0700

    plugins: use fallback to peas now that it supports base classes
    
    Now that libpeas supports base classes, we no longer need this. Ideally we
    can just change the code to use this API directly, but until I'm sure we
    don't need any special cases, let's just wrap it.

 libide/plugins/ide-extension-util.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/libide/plugins/ide-extension-util.c b/libide/plugins/ide-extension-util.c
index e1c4f42..d06c74a 100644
--- a/libide/plugins/ide-extension-util.c
+++ b/libide/plugins/ide-extension-util.c
@@ -228,23 +228,14 @@ ide_extension_set_new (PeasEngine     *engine,
                        const gchar    *first_property,
                        ...)
 {
-  g_autoptr(GArray) params = NULL;
+  PeasExtensionSet *ret;
   va_list args;
 
-  g_return_val_if_fail (!engine || PEAS_IS_ENGINE (engine), NULL);
-  g_return_val_if_fail (G_TYPE_IS_INTERFACE (type), NULL);
-
-  if (engine == NULL)
-    engine = peas_engine_get_default ();
-
   va_start (args, first_property);
-  params = collect_parameters (type, first_property, args);
+  ret = peas_extension_set_new_valist (engine, type, first_property, args);
   va_end (args);
 
-  if (params == NULL)
-    return NULL;
-
-  return peas_extension_set_newv (engine, type, params->len, (GParameter *)params->data);
+  return ret;
 }
 
 PeasExtension *


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