summaryrefslogtreecommitdiff
path: root/json-glib/json-gvariant.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2013-03-13 14:41:23 -0300
committerEmmanuele Bassi <ebassi@gnome.org>2013-03-13 14:45:44 -0300
commite1a55fde8a6a5cc0f1fe44ccfd54c60dd8a7aec6 (patch)
tree15e5e54ffa37837c1e07b9b67310e419e5c74e33 /json-glib/json-gvariant.c
parent8bba53c334b26811083c6d786a527afce965f25d (diff)
downloadjson-glib-e1a55fde8a6a5cc0f1fe44ccfd54c60dd8a7aec6.tar.gz
variant: Fix documentation and annotations for deserialize()
The returned GVariant when deserializing from JSON has a floating reference that needs to be sunk.
Diffstat (limited to 'json-glib/json-gvariant.c')
-rw-r--r--json-glib/json-gvariant.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/json-glib/json-gvariant.c b/json-glib/json-gvariant.c
index cae43e0..932914a 100644
--- a/json-glib/json-gvariant.c
+++ b/json-glib/json-gvariant.c
@@ -41,6 +41,7 @@
* Use json_gvariant_deserialize() and json_gvariant_deserialize_data() to
* obtain the #GVariant value from a #JsonNode tree or directly from a JSON
* string.
+ *
* Since many #GVariant data types cannot be directly represented as
* JSON, a #GVariant type string (signature) should be provided to these
* methods in order to obtain a correct, type-contrained result.
@@ -1261,8 +1262,11 @@ out:
* If @signature is %NULL, the conversion is done based strictly on the types
* in the JSON nodes.
*
- * Return value: (transfer full): A newly created #GVariant compliant with
- * @signature, or %NULL on error
+ * The returned variant has a floating reference that will need to be sunk
+ * by the caller code.
+ *
+ * Return value: (transfer none): A newly created, floating #GVariant
+ * compliant with @signature, or %NULL on error
*
* Since: 0.14
*/
@@ -1297,8 +1301,11 @@ json_gvariant_deserialize (JsonNode *json_node,
* The string is first converted to a #JsonNode using #JsonParser, and then
* json_gvariant_deserialize() is called.
*
- * Returns: (transfer full): A newly created #GVariant compliant with
- * @signature, or %NULL on error
+ * The returned variant has a floating reference that will need to be sunk
+ * by the caller code.
+ *
+ * Returns: (transfer none): A newly created, floating #GVariant compliant
+ * with @signature, or %NULL on error
*
* Since: 0.14
*/