[libpeas] Use the new gobject-introspection annotations



commit b71fe27f2466cb57ad38eb4c58768d1d9ef27c8d
Author: Garrett Regier <garrettregier gmail com>
Date:   Sun Nov 3 15:30:23 2013 -0800

    Use the new gobject-introspection annotations
    
    And fix warnings given by the newer version.

 configure.ac                 |    2 +-
 libpeas/peas-engine.c        |   10 +++-------
 libpeas/peas-extension-set.c |    8 +++-----
 libpeas/peas-extension-set.h |    4 +++-
 libpeas/peas-extension.h     |    4 +++-
 5 files changed, 13 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3ca64db..6dbc244 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ PKG_PROG_PKG_CONFIG
 
 GLIB_REQUIRED=2.30.0
 GIO_REQUIRED=2.31.2
-INTROSPECTION_REQUIRED=0.10.1
+INTROSPECTION_REQUIRED=1.39.0
 
 PKG_CHECK_MODULES(PEAS, [
        glib-2.0 >= $GLIB_REQUIRED
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index e82f5eb..5b2d2b7 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -878,7 +878,7 @@ peas_engine_load_plugin_real (PeasEngine     *engine,
 }
 
 /**
- * peas_engine_load_plugin:
+ * peas_engine_load_plugin: (virtual load_plugin)
  * @engine: A #PeasEngine.
  * @info: A #PeasPluginInfo.
  *
@@ -887,7 +887,6 @@ peas_engine_load_plugin_real (PeasEngine     *engine,
  * actually occurs in the default signal handler.
  *
  * Returns: whether the plugin has been successfully loaded.
- * Virtual: load_plugin
  */
 gboolean
 peas_engine_load_plugin (PeasEngine     *engine,
@@ -950,7 +949,7 @@ peas_engine_unload_plugin_real (PeasEngine     *engine,
 }
 
 /**
- * peas_engine_unload_plugin:
+ * peas_engine_unload_plugin: (virtual unload_plugin)
  * @engine: A #PeasEngine.
  * @info: A #PeasPluginInfo.
  *
@@ -959,7 +958,6 @@ peas_engine_unload_plugin_real (PeasEngine     *engine,
  * actually occurs in the default signal handler.
  *
  * Returns: whether the plugin has been successfully unloaded.
- * Virtual: unload_plugin
  */
 gboolean
 peas_engine_unload_plugin (PeasEngine     *engine,
@@ -1006,7 +1004,7 @@ peas_engine_provides_extension (PeasEngine     *engine,
 }
 
 /**
- * peas_engine_create_extensionv:
+ * peas_engine_create_extensionv: (rename-to peas_engine_create_extension)
  * @engine: A #PeasEngine.
  * @info: A loaded #PeasPluginInfo.
  * @extension_type: The implemented extension #GType.
@@ -1022,8 +1020,6 @@ peas_engine_provides_extension (PeasEngine     *engine,
  *
  * Returns: (transfer full): a new instance of #PeasExtension wrapping
  * the @extension_type instance, or %NULL.
- *
- * Rename to: peas_engine_create_extension
  */
 PeasExtension *
 peas_engine_create_extensionv (PeasEngine     *engine,
diff --git a/libpeas/peas-extension-set.c b/libpeas/peas-extension-set.c
index a91889f..2ac13a6 100644
--- a/libpeas/peas-extension-set.c
+++ b/libpeas/peas-extension-set.c
@@ -602,7 +602,7 @@ peas_extension_set_foreach (PeasExtensionSet            *set,
 }
 
 /**
- * peas_extension_set_newv:
+ * peas_extension_set_newv: (rename-to peas_extension_set_new)
  * @engine: (allow-none): A #PeasEngine, or %NULL.
  * @exten_type: the extension #GType.
  * @n_parameters: the length of the @parameters array.
@@ -615,8 +615,6 @@ peas_extension_set_foreach (PeasExtensionSet            *set,
  * See peas_extension_set_new() for more information.
  *
  * Returns: (transfer full): a new instance of #PeasExtensionSet.
- *
- * Rename to: peas_extension_set_new
  */
 PeasExtensionSet *
 peas_extension_set_newv (PeasEngine *engine,
@@ -638,7 +636,7 @@ peas_extension_set_newv (PeasEngine *engine,
 
 /**
  * peas_extension_set_new_valist: (skip)
- * @engine: A #PeasEngine, or %NULL.
+ * @engine: (allow-none): A #PeasEngine, or %NULL.
  * @exten_type: the extension #GType.
  * @first_property: the name of the first property.
  * @var_args: the value of the first property, followed optionally by more
@@ -683,7 +681,7 @@ peas_extension_set_new_valist (PeasEngine  *engine,
 
 /**
  * peas_extension_set_new: (skip)
- * @engine: A #PeasEngine, or %NULL.
+ * @engine: (allow-none): A #PeasEngine, or %NULL.
  * @exten_type: the extension #GType.
  * @first_property: the name of the first property.
  * @...: the value of the first property, followed optionally by more
diff --git a/libpeas/peas-extension-set.h b/libpeas/peas-extension-set.h
index 4d89eee..9a46bfc 100644
--- a/libpeas/peas-extension-set.h
+++ b/libpeas/peas-extension-set.h
@@ -112,7 +112,8 @@ typedef void (*PeasExtensionSetForeachFunc) (PeasExtensionSet *set,
  */
 GType              peas_extension_set_get_type    (void)  G_GNUC_CONST;
 
-#if !defined(PEAS_DISABLE_DEPRECATED) && !defined(__GI_SCANNER__)
+#ifndef __GI_SCANNER__
+#ifndef PEAS_DISABLE_DEPRECATED
 gboolean           peas_extension_set_call        (PeasExtensionSet *set,
                                                    const gchar      *method_name,
                                                    ...);
@@ -123,6 +124,7 @@ gboolean           peas_extension_set_callv       (PeasExtensionSet *set,
                                                    const gchar      *method_name,
                                                    GIArgument       *args);
 #endif
+#endif
 
 void               peas_extension_set_foreach     (PeasExtensionSet *set,
                                                    PeasExtensionSetForeachFunc func,
diff --git a/libpeas/peas-extension.h b/libpeas/peas-extension.h
index 124067b..bbef5a0 100644
--- a/libpeas/peas-extension.h
+++ b/libpeas/peas-extension.h
@@ -46,7 +46,8 @@ typedef GObject PeasExtension;
  * used. Due to gi-scanner's touchiness, we also hide these legacy API from
  * GI to avoid hairy issues.
  */
-#if !defined(PEAS_DISABLE_DEPRECATED) && !defined(__GI_SCANNER__)
+#ifndef __GI_SCANNER__
+#ifndef PEAS_DISABLE_DEPRECATED
 GType        peas_extension_get_type        (void)  G_GNUC_CONST;
 
 GType        peas_extension_get_extension_type
@@ -63,6 +64,7 @@ gboolean     peas_extension_callv           (PeasExtension *exten,
                                              GIArgument    *args,
                                              GIArgument    *return_value);
 #endif
+#endif
 
 G_END_DECLS
 


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