[PATCH 1/2] annotations: fixed GrlConfig annotations



* grl_config_new now allows NULL sources for a plugin-wide
  configuration
* grl_config_new is annotated as 'transfer none', to avoid freeing
  the configuration while the plugin is valid.

Signed-off-by: Simón Pena <spenap gmail com>
---
 src/data/grl-config.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/data/grl-config.c b/src/data/grl-config.c
index d963773..8bc780d 100644
--- a/src/data/grl-config.c
+++ b/src/data/grl-config.c
@@ -94,14 +94,16 @@ grl_config_finalize (GObject *object)
 /**
  * grl_config_new:
  * @plugin: plugin id for this configuration
- * @source: source id for this configuration
+ * @source: (allow-none): source id for this configuration
  *
  * Creates a new data config object that will be associated with a plugin
  * (if @source is NULL), or a specific source spawned from a plugin (if
  * @source is not NULL). The latter may be useful for plugins
  * spawning various sources, each one needing a different configuration.
  *
- * Returns: a newly-allocated data config.
+ * Returns: (transfer none): a newly-allocated data config. The data
+ * config associated with the plugin should not be freed until the plugin
+ * has been unloaded.
  */
 GrlConfig *
 grl_config_new (const gchar *plugin, const gchar *source)
-- 
1.7.0.4



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