[libpeas] [PeasEngine] Rename get_extension() to create_extension()



commit 754bc3ae64865eecc1c0ebb141a4c2d5a39ec88a
Author: Steve Frécinaux <code istique net>
Date:   Mon Jul 19 20:17:07 2010 +0200

    [PeasEngine] Rename get_extension() to create_extension()
    
    This is closer to the actual behaviour of that function.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=620057

 docs/reference/libpeas-sections.txt        |    2 +-
 libpeas/peas-engine.c                      |   41 ++++++++++++++-------------
 libpeas/peas-engine.h                      |    6 ++--
 libpeas/peas-extension-set.c               |    8 +++---
 libpeas/peas-plugin-loader.c               |   14 +++++-----
 libpeas/peas-plugin-loader.h               |    4 +-
 libpeasui/peas-ui-plugin-manager.c         |    2 +-
 loaders/c/peas-plugin-loader-c.c           |   12 ++++----
 loaders/python/peas-plugin-loader-python.c |   12 ++++----
 loaders/seed/peas-plugin-loader-seed.c     |   12 ++++----
 10 files changed, 57 insertions(+), 56 deletions(-)
---
diff --git a/docs/reference/libpeas-sections.txt b/docs/reference/libpeas-sections.txt
index fc0e3fb..62b937e 100644
--- a/docs/reference/libpeas-sections.txt
+++ b/docs/reference/libpeas-sections.txt
@@ -71,7 +71,7 @@ peas_engine_load_plugin
 peas_engine_unload_plugin
 peas_engine_garbage_collect
 peas_engine_provides_extension
-peas_engine_get_extension
+peas_engine_create_extension
 peas_engine_disable_loader
 <SUBSECTION Standard>
 PEAS_ENGINE
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index ae59116..8cbab4e 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -884,11 +884,11 @@ peas_engine_provides_extension (PeasEngine     *engine,
 }
 
 PeasExtension *
-peas_engine_get_extensionv (PeasEngine     *engine,
-                            PeasPluginInfo *info,
-                            GType           extension_type,
-                            guint           n_parameters,
-                            GParameter     *parameters)
+peas_engine_create_extensionv (PeasEngine     *engine,
+                               PeasPluginInfo *info,
+                               GType           extension_type,
+                               guint           n_parameters,
+                               GParameter     *parameters)
 {
   PeasPluginLoader *loader;
 
@@ -896,16 +896,16 @@ peas_engine_get_extensionv (PeasEngine     *engine,
   g_return_val_if_fail (info != NULL, NULL);
 
   loader = get_plugin_loader (engine, info);
-  return peas_plugin_loader_get_extension (loader, info, extension_type,
-                                           n_parameters, parameters);
+  return peas_plugin_loader_create_extension (loader, info, extension_type,
+                                              n_parameters, parameters);
 }
 
 PeasExtension *
-peas_engine_get_extension_valist (PeasEngine     *engine,
-                                  PeasPluginInfo *info,
-                                  GType           extension_type,
-                                  const gchar    *first_property,
-                                  va_list         var_args)
+peas_engine_create_extension_valist (PeasEngine     *engine,
+                                     PeasPluginInfo *info,
+                                     GType           extension_type,
+                                     const gchar    *first_property,
+                                     va_list         var_args)
 {
   gpointer type_struct;
   guint n_parameters;
@@ -920,8 +920,8 @@ peas_engine_get_extension_valist (PeasEngine     *engine,
       g_return_val_if_reached (NULL);
     }
 
-  exten = peas_engine_get_extensionv (engine, info, extension_type,
-                                      n_parameters, parameters);
+  exten = peas_engine_create_extensionv (engine, info, extension_type,
+                                         n_parameters, parameters);
 
   while (n_parameters-- > 0)
     g_value_unset (&parameters[n_parameters].value);
@@ -933,17 +933,18 @@ peas_engine_get_extension_valist (PeasEngine     *engine,
 }
 
 PeasExtension *
-peas_engine_get_extension (PeasEngine     *engine,
-                           PeasPluginInfo *info,
-                           GType           extension_type,
-                           const gchar    *first_property,
-                           ...)
+peas_engine_create_extension (PeasEngine     *engine,
+                              PeasPluginInfo *info,
+                              GType           extension_type,
+                              const gchar    *first_property,
+                              ...)
 {
   va_list var_args;
   PeasExtension *exten;
 
   va_start (var_args, first_property);
-  exten = peas_engine_get_extension_valist (engine, info, extension_type, first_property, var_args);
+  exten = peas_engine_create_extension_valist (engine, info, extension_type,
+                                               first_property, var_args);
   va_end (var_args);
 
   return exten;
diff --git a/libpeas/peas-engine.h b/libpeas/peas-engine.h
index d54f497..e1f9439 100644
--- a/libpeas/peas-engine.h
+++ b/libpeas/peas-engine.h
@@ -89,18 +89,18 @@ gboolean          peas_engine_provides_extension  (PeasEngine      *engine,
                                                    GType            extension_type);
 
 
-PeasExtension    *peas_engine_get_extensionv      (PeasEngine      *engine,
+PeasExtension    *peas_engine_create_extensionv   (PeasEngine      *engine,
                                                    PeasPluginInfo  *info,
                                                    GType            extension_type,
                                                    guint            n_parameters,
                                                    GParameter      *parameters);
-PeasExtension    *peas_engine_get_extension_valist
+PeasExtension    *peas_engine_create_extension_valist
                                                   (PeasEngine      *engine,
                                                    PeasPluginInfo  *info,
                                                    GType            extension_type,
                                                    const gchar     *first_property,
                                                    va_list          var_args);
-PeasExtension    *peas_engine_get_extension       (PeasEngine      *engine,
+PeasExtension    *peas_engine_create_extension    (PeasEngine      *engine,
                                                    PeasPluginInfo  *info,
                                                    GType            extension_type,
                                                    const gchar     *first_property,
diff --git a/libpeas/peas-extension-set.c b/libpeas/peas-extension-set.c
index 9713ae0..3d3ad39 100644
--- a/libpeas/peas-extension-set.c
+++ b/libpeas/peas-extension-set.c
@@ -157,10 +157,10 @@ add_extension (PeasExtensionSet *set,
   if (!peas_plugin_info_is_loaded (info))
     return;
 
-  exten = peas_engine_get_extensionv (set->priv->engine, info,
-                                      set->priv->exten_type,
-                                      set->priv->n_parameters,
-                                      set->priv->parameters);
+  exten = peas_engine_create_extensionv (set->priv->engine, info,
+                                         set->priv->exten_type,
+                                         set->priv->n_parameters,
+                                         set->priv->parameters);
   if (!exten)
     return;
 
diff --git a/libpeas/peas-plugin-loader.c b/libpeas/peas-plugin-loader.c
index 2399da9..ea5bfb4 100644
--- a/libpeas/peas-plugin-loader.c
+++ b/libpeas/peas-plugin-loader.c
@@ -95,20 +95,20 @@ peas_plugin_loader_provides_extension (PeasPluginLoader *loader,
 }
 
 PeasExtension *
-peas_plugin_loader_get_extension (PeasPluginLoader *loader,
-                                  PeasPluginInfo   *info,
-                                  GType             ext_type,
-                                  guint             n_parameters,
-                                  GParameter       *parameters)
+peas_plugin_loader_create_extension (PeasPluginLoader *loader,
+                                     PeasPluginInfo   *info,
+                                     GType             ext_type,
+                                     guint             n_parameters,
+                                     GParameter       *parameters)
 {
   PeasPluginLoaderClass *klass;
 
   g_return_val_if_fail (PEAS_IS_PLUGIN_LOADER (loader), NULL);
 
   klass = PEAS_PLUGIN_LOADER_GET_CLASS (loader);
-  g_return_val_if_fail (klass->get_extension != NULL, NULL);
+  g_return_val_if_fail (klass->create_extension != NULL, NULL);
 
-  return klass->get_extension (loader, info, ext_type, n_parameters, parameters);
+  return klass->create_extension (loader, info, ext_type, n_parameters, parameters);
 }
 
 void
diff --git a/libpeas/peas-plugin-loader.h b/libpeas/peas-plugin-loader.h
index cf78d86..00d9030 100644
--- a/libpeas/peas-plugin-loader.h
+++ b/libpeas/peas-plugin-loader.h
@@ -56,7 +56,7 @@ struct _PeasPluginLoaderClass {
   gboolean       (*provides_extension)    (PeasPluginLoader *loader,
                                            PeasPluginInfo   *info,
                                            GType             ext_type);
-  PeasExtension *(*get_extension)         (PeasPluginLoader *loader,
+  PeasExtension *(*create_extension)      (PeasPluginLoader *loader,
                                            PeasPluginInfo   *info,
                                            GType             ext_type,
                                            guint             n_parameters,
@@ -78,7 +78,7 @@ void          peas_plugin_loader_unload               (PeasPluginLoader *loader,
 gboolean      peas_plugin_loader_provides_extension   (PeasPluginLoader *loader,
                                                        PeasPluginInfo   *info,
                                                        GType             ext_type);
-PeasExtension *peas_plugin_loader_get_extension       (PeasPluginLoader *loader,
+PeasExtension *peas_plugin_loader_create_extension    (PeasPluginLoader *loader,
                                                        PeasPluginInfo   *info,
                                                        GType             ext_type,
                                                        guint             n_parameters,
diff --git a/libpeasui/peas-ui-plugin-manager.c b/libpeasui/peas-ui-plugin-manager.c
index c7ff538..4850cc0 100644
--- a/libpeasui/peas-ui-plugin-manager.c
+++ b/libpeasui/peas-ui-plugin-manager.c
@@ -218,7 +218,7 @@ show_configure_cb (GtkWidget           *widget,
   info = peas_ui_plugin_manager_view_get_selected_plugin (view);
   g_return_if_fail (info != NULL);
 
-  exten = peas_engine_get_extension (pm->priv->engine, info, PEAS_UI_TYPE_CONFIGURABLE, NULL);
+  exten = peas_engine_create_extension (pm->priv->engine, info, PEAS_UI_TYPE_CONFIGURABLE, NULL);
   g_return_if_fail (PEAS_IS_EXTENSION (exten));
 
   peas_extension_call (exten, "create_configure_widget", &conf_widget);
diff --git a/loaders/c/peas-plugin-loader-c.c b/loaders/c/peas-plugin-loader-c.c
index 40d334d..4f15b1e 100644
--- a/loaders/c/peas-plugin-loader-c.c
+++ b/loaders/c/peas-plugin-loader-c.c
@@ -109,11 +109,11 @@ peas_plugin_loader_c_provides_extension  (PeasPluginLoader *loader,
 }
 
 static PeasExtension *
-peas_plugin_loader_c_get_extension (PeasPluginLoader *loader,
-                                    PeasPluginInfo   *info,
-                                    GType             exten_type,
-                                    guint             n_parameters,
-                                    GParameter       *parameters)
+peas_plugin_loader_c_create_extension (PeasPluginLoader *loader,
+                                       PeasPluginInfo   *info,
+                                       GType             exten_type,
+                                       guint             n_parameters,
+                                       GParameter       *parameters)
 {
   PeasPluginLoaderC *cloader = PEAS_PLUGIN_LOADER_C (loader);
   PeasObjectModule *module;
@@ -227,7 +227,7 @@ peas_plugin_loader_c_class_init (PeasPluginLoaderCClass *klass)
   loader_class->load = peas_plugin_loader_c_load;
   loader_class->unload = peas_plugin_loader_c_unload;
   loader_class->provides_extension = peas_plugin_loader_c_provides_extension;
-  loader_class->get_extension = peas_plugin_loader_c_get_extension;
+  loader_class->create_extension = peas_plugin_loader_c_create_extension;
 
   g_type_class_add_private (object_class, sizeof (PeasPluginLoaderCPrivate));
 }
diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 4198a56..9d53a65 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -136,11 +136,11 @@ peas_plugin_loader_python_provides_extension (PeasPluginLoader *loader,
 }
 
 static PeasExtension *
-peas_plugin_loader_python_get_extension (PeasPluginLoader *loader,
-                                         PeasPluginInfo   *info,
-                                         GType             exten_type,
-                                         guint             n_parameters,
-                                         GParameter       *parameters)
+peas_plugin_loader_python_create_extension (PeasPluginLoader *loader,
+                                            PeasPluginInfo   *info,
+                                            GType             exten_type,
+                                            guint             n_parameters,
+                                            GParameter       *parameters)
 {
   PeasPluginLoaderPython *pyloader = PEAS_PLUGIN_LOADER_PYTHON (loader);
   PythonInfo *pyinfo;
@@ -586,7 +586,7 @@ peas_plugin_loader_python_class_init (PeasPluginLoaderPythonClass *klass)
   loader_class->add_module_directory = peas_plugin_loader_python_add_module_directory;
   loader_class->load = peas_plugin_loader_python_load;
   loader_class->unload = peas_plugin_loader_python_unload;
-  loader_class->get_extension = peas_plugin_loader_python_get_extension;
+  loader_class->create_extension = peas_plugin_loader_python_create_extension;
   loader_class->provides_extension = peas_plugin_loader_python_provides_extension;
   loader_class->garbage_collect = peas_plugin_loader_python_garbage_collect;
 
diff --git a/loaders/seed/peas-plugin-loader-seed.c b/loaders/seed/peas-plugin-loader-seed.c
index 5fc1e25..5a184ad 100644
--- a/loaders/seed/peas-plugin-loader-seed.c
+++ b/loaders/seed/peas-plugin-loader-seed.c
@@ -153,11 +153,11 @@ peas_plugin_loader_seed_provides_extension  (PeasPluginLoader *loader,
 }
 
 static PeasExtension *
-peas_plugin_loader_seed_get_extension (PeasPluginLoader *loader,
-                                       PeasPluginInfo   *info,
-                                       GType             exten_type,
-                                       guint             n_parameters,
-                                       GParameter       *parameters)
+peas_plugin_loader_seed_create_extension (PeasPluginLoader *loader,
+                                          PeasPluginInfo   *info,
+                                          GType             exten_type,
+                                          guint             n_parameters,
+                                          GParameter       *parameters)
 {
   PeasPluginLoaderSeed *sloader = PEAS_PLUGIN_LOADER_SEED (loader);
   SeedInfo *sinfo;
@@ -272,7 +272,7 @@ peas_plugin_loader_seed_class_init (PeasPluginLoaderSeedClass *klass)
   loader_class->add_module_directory = peas_plugin_loader_seed_add_module_directory;
   loader_class->load = peas_plugin_loader_seed_load;
   loader_class->provides_extension = peas_plugin_loader_seed_provides_extension;
-  loader_class->get_extension = peas_plugin_loader_seed_get_extension;
+  loader_class->create_extension = peas_plugin_loader_seed_create_extension;
   loader_class->unload = peas_plugin_loader_seed_unload;
   loader_class->garbage_collect = peas_plugin_loader_seed_garbage_collect;
 }



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