[json-glib] introspection: fix nullable annotation for return values in the following methods
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] introspection: fix nullable annotation for return values in the following methods
- Date: Sat, 18 Mar 2017 18:59:27 +0000 (UTC)
commit abf36db8113aba96b3be2d11eaffcb51e5ccccb7
Author: Alberto Ruiz <aruiz gnome org>
Date: Mon Dec 28 21:15:49 2015 +0000
introspection: fix nullable annotation for return values in the following methods
json_builder_add_boolean_value
json_builder_add_double_value
json_builder_add_int_value
json_builder_add_null_value
json_builder_add_string_value
json_builder_add_value
json_builder_begin_array
json_builder_begin_object
json_builder_end_array
json_builder_end_object
json_builder_get_root
json_builder_set_member_name
json_generator_get_root
json_reader_get_error
json_reader_get_member_name
json_reader_get_value
json_serializable_find_property
json_serializable_find_property
json_boxed_serialize
json-glib/json-builder.c | 37 ++++++++++++++++++++++++-------------
json-glib/json-gboxed.c | 4 ++--
json-glib/json-generator.c | 4 ++--
json-glib/json-reader.c | 10 +++++-----
json-glib/json-serializable.c | 2 +-
5 files changed, 34 insertions(+), 23 deletions(-)
---
diff --git a/json-glib/json-builder.c b/json-glib/json-builder.c
index 34c29c6..f8af1cd 100644
--- a/json-glib/json-builder.c
+++ b/json-glib/json-builder.c
@@ -271,8 +271,8 @@ json_builder_new_immutable (void)
* Returns the root of the current constructed tree, if the build is complete
* (ie: all opened objects, object members and arrays are being closed).
*
- * Return value: (transfer full): the #JsonNode, or %NULL if the build is not complete.
- * Free the returned value with json_node_unref().
+ * Return value: (nullable) (transfer full): the #JsonNode, or %NULL if the
+ * build is not complete. Free the returned value with json_node_unref().
*/
JsonNode *
json_builder_get_root (JsonBuilder *builder)
@@ -316,7 +316,8 @@ json_builder_reset (JsonBuilder *builder)
* Can be called for first or only if the call is associated to an object member
* or an array element.
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_begin_object (JsonBuilder *builder)
@@ -369,7 +370,8 @@ json_builder_begin_object (JsonBuilder *builder)
*
* Cannot be called after json_builder_set_member_name().
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_end_object (JsonBuilder *builder)
@@ -409,7 +411,8 @@ json_builder_end_object (JsonBuilder *builder)
* Can be called for first or only if the call is associated to an object member
* or an array element.
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_begin_array (JsonBuilder *builder)
@@ -461,7 +464,8 @@ json_builder_begin_array (JsonBuilder *builder)
*
* Cannot be called after json_builder_set_member_name().
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_end_array (JsonBuilder *builder)
@@ -501,7 +505,8 @@ json_builder_end_array (JsonBuilder *builder)
*
* Can be called only if the call is associated to an object.
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_set_member_name (JsonBuilder *builder,
@@ -532,7 +537,8 @@ json_builder_set_member_name (JsonBuilder *builder,
*
* The builder will take ownership of the #JsonNode.
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_add_value (JsonBuilder *builder,
@@ -581,7 +587,8 @@ json_builder_add_value (JsonBuilder *builder,
*
* See also: json_builder_add_value()
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_add_int_value (JsonBuilder *builder,
@@ -625,7 +632,8 @@ json_builder_add_int_value (JsonBuilder *builder,
*
* See also: json_builder_add_value()
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_add_double_value (JsonBuilder *builder,
@@ -670,7 +678,8 @@ json_builder_add_double_value (JsonBuilder *builder,
*
* See also: json_builder_add_value()
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_add_boolean_value (JsonBuilder *builder,
@@ -715,7 +724,8 @@ json_builder_add_boolean_value (JsonBuilder *builder,
*
* See also: json_builder_add_value()
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if the
+ * call was inconsistent
*/
JsonBuilder *
json_builder_add_string_value (JsonBuilder *builder,
@@ -759,7 +769,8 @@ json_builder_add_string_value (JsonBuilder *builder,
*
* See also: json_builder_add_value()
*
- * Return value: (transfer none): the #JsonBuilder, or %NULL if the call was inconsistent
+ * Return value: (nullable) (transfer none): the #JsonBuilder, or %NULL if
+ * the call was inconsistent
*/
JsonBuilder *
json_builder_add_null_value (JsonBuilder *builder)
diff --git a/json-glib/json-gboxed.c b/json-glib/json-gboxed.c
index ef53af1..f274e6d 100644
--- a/json-glib/json-gboxed.c
+++ b/json-glib/json-gboxed.c
@@ -296,8 +296,8 @@ json_boxed_can_deserialize (GType gboxed_type,
* Serializes @boxed, a pointer to a #GBoxed of type @gboxed_type,
* into a #JsonNode
*
- * Return value: (transfer full): a #JsonNode with the serialization of the
- * boxed type, or %NULL if serialization either failed or was not possible
+ * Return value: (nullable) (transfer full): a #JsonNode with the serialization of
+ * the boxed type, or %NULL if serialization either failed or was not possible
*
* Since: 0.10
*/
diff --git a/json-glib/json-generator.c b/json-glib/json-generator.c
index d1a0894..6a9aff4 100644
--- a/json-glib/json-generator.c
+++ b/json-glib/json-generator.c
@@ -623,8 +623,8 @@ json_generator_set_root (JsonGenerator *generator,
* Retrieves a pointer to the root #JsonNode set using
* json_generator_set_root().
*
- * Return value: (transfer none): a #JsonNode, or %NULL. The returned node
- * is owned by the #JsonGenerator and it should not be freed
+ * Return value: (nullable) (transfer none): a #JsonNode, or %NULL. The returned
+ * node is owned by the #JsonGenerator and it should not be freed
*
* Since: 0.14
*/
diff --git a/json-glib/json-reader.c b/json-glib/json-reader.c
index 6117ced..b12734f 100644
--- a/json-glib/json-reader.c
+++ b/json-glib/json-reader.c
@@ -321,7 +321,7 @@ json_reader_set_error (JsonReader *reader,
* Retrieves the #GError currently set on @reader, if the #JsonReader
* is in error state
*
- * Return value: (transfer none): the pointer to the error, or %NULL
+ * Return value: (nullable) (transfer none): the pointer to the error, or %NULL
*
* Since: 0.12
*/
@@ -820,9 +820,9 @@ json_reader_count_members (JsonReader *reader)
*
* Retrieves the #JsonNode of the current position of @reader
*
- * Return value: (transfer none): a #JsonNode, or %NULL. The returned node
- * is owned by the #JsonReader and it should not be modified or freed
- * directly
+ * Return value: (nullable) (transfer none): a #JsonNode, or %NULL. The
+ * returned node is owned by the #JsonReader and it should not be
+ * modified or freed directly
*
* Since: 0.12
*/
@@ -1045,7 +1045,7 @@ json_reader_get_null_value (JsonReader *reader)
*
* Retrieves the name of the current member.
*
- * Return value: (transfer none): the name of the member, or %NULL
+ * Return value: (nullable) (transfer none): the name of the member, or %NULL
*
* Since: 0.14
*/
diff --git a/json-glib/json-serializable.c b/json-glib/json-serializable.c
index 471225e..d7a76d6 100644
--- a/json-glib/json-serializable.c
+++ b/json-glib/json-serializable.c
@@ -276,7 +276,7 @@ json_serializable_default_deserialize_property (JsonSerializable *serializable,
* Calls the #JsonSerializableIface.find_property() implementation on
* the @serializable instance. *
*
- * Return value: (transfer none): the #GParamSpec for the property
+ * Return value: (nullable) (transfer none): the #GParamSpec for the property
* or %NULL if no property was found
*
* Since: 0.14
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]