common: gsignond_dictionary_ref() now return slef pointer as other glib objects do.
authorAmarnath Valluri <amarnath.valluri@linux.intel.com>
Mon, 22 Jul 2013 13:07:51 +0000 (16:07 +0300)
committerAmarnath Valluri <amarnath.valluri@linux.intel.com>
Mon, 22 Jul 2013 17:29:46 +0000 (20:29 +0300)
include/gsignond/gsignond-dictionary.h
src/common/gsignond-dictionary.c

index e5f951b..400f970 100644 (file)
@@ -47,7 +47,7 @@ gsignond_dictionary_get_type (void);
 GSignondDictionary *
 gsignond_dictionary_new (void);
 
-void
+GSignondDictionary *
 gsignond_dictionary_ref (GSignondDictionary *dict);
 
 void
index 7d2c0c2..0b4996b 100644 (file)
@@ -109,13 +109,14 @@ gsignond_dictionary_new (void)
  * @dict: instance of #GSignondDictionary
  *
  * Increment reference count of the dictionary structure.
+ * Returns: the passed in #GSignondDictionary
  */
-void
+GSignondDictionary*
 gsignond_dictionary_ref (GSignondDictionary *dict)
 {
-    g_return_if_fail (dict != NULL);
+    g_return_val_if_fail (dict != NULL, NULL);
 
-    g_hash_table_ref (dict);
+    return (GSignondDictionary*)g_hash_table_ref (dict);
 }
 
 /**