[json-glib] [docs] Small documentation fixes
- From: Emmanuele Bassi <ebassi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [json-glib] [docs] Small documentation fixes
- Date: Wed, 2 Sep 2009 15:47:36 +0000 (UTC)
commit 7442a3011a860f12cbd40b6687b699b0b648d6b7
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Sep 2 16:41:51 2009 +0100
[docs] Small documentation fixes
Clean up some notes, and add introspection annotations where needed.
json-glib/json-generator.c | 11 ++++++-----
json-glib/json-gobject.c | 24 ++++++++++++------------
json-glib/json-parser.c | 3 ++-
3 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/json-glib/json-generator.c b/json-glib/json-generator.c
index 01e5832..c17d97f 100644
--- a/json-glib/json-generator.c
+++ b/json-glib/json-generator.c
@@ -532,13 +532,14 @@ json_generator_new (void)
/**
* json_generator_to_data:
* @generator: a #JsonGenerator
- * @length: return location for the length of the returned buffer, or %NULL
+ * @length: (out): return location for the length of the returned
+ * buffer, or %NULL
*
* Generates a JSON data stream from @generator and returns it as a
* buffer.
*
- * Return value: a newly allocated buffer holding a JSON data stream. Use
- * g_free() to free the allocated resources.
+ * Return value: a newly allocated buffer holding a JSON data stream.
+ * Use g_free() to free the allocated resources.
*/
gchar *
json_generator_to_data (JsonGenerator *generator,
@@ -620,8 +621,8 @@ json_generator_to_file (JsonGenerator *generator,
* Sets @node as the root of the JSON data stream to be serialized by
* the #JsonGenerator.
*
- * Note: the node is copied by the generator object, so it can be safely
- * freed after calling this function.
+ * <note>The node is copied by the generator object, so it can be safely
+ * freed after calling this function.</note>
*/
void
json_generator_set_root (JsonGenerator *generator,
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 6913537..1b198ca 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -341,16 +341,6 @@ json_serialize_pspec (const GValue *real_value,
g_value_unset (&value);
break;
- case G_TYPE_INT:
- retval = json_node_new (JSON_NODE_VALUE);
- json_node_set_int (retval, g_value_get_int (real_value));
- break;
-
- case G_TYPE_FLOAT:
- retval = json_node_new (JSON_NODE_VALUE);
- json_node_set_double (retval, g_value_get_float (real_value));
- break;
-
case G_TYPE_STRING:
/* strings might be NULL */
if (!g_value_get_string (real_value))
@@ -363,6 +353,16 @@ json_serialize_pspec (const GValue *real_value,
}
break;
+ case G_TYPE_INT:
+ retval = json_node_new (JSON_NODE_VALUE);
+ json_node_set_int (retval, g_value_get_int (real_value));
+ break;
+
+ case G_TYPE_FLOAT:
+ retval = json_node_new (JSON_NODE_VALUE);
+ json_node_set_double (retval, g_value_get_float (real_value));
+ break;
+
case G_TYPE_BOXED:
if (G_VALUE_HOLDS (real_value, G_TYPE_STRV))
{
@@ -449,7 +449,7 @@ json_serialize_pspec (const GValue *real_value,
* Asks a #JsonSerializable implementation to serialize a #GObject
* property into a #JsonNode object.
*
- * Return value: a #JsonNode containing the serialize property
+ * Return value: a #JsonNode containing the serialized property
*/
JsonNode *
json_serializable_serialize_property (JsonSerializable *serializable,
@@ -695,7 +695,7 @@ json_construct_gobject (GType gtype,
/**
* json_serialize_gobject:
* @gobject: a #GObject
- * @length: return value for the length of the buffer, or %NULL
+ * @length: (out): return value for the length of the buffer, or %NULL
*
* Serializes a #GObject into a JSON data stream. If @gobject implements
* the #JsonSerializableIface interface, it will be asked to serizalize all
diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c
index accf876..18b13e3 100644
--- a/json-glib/json-parser.c
+++ b/json-glib/json-parser.c
@@ -1208,7 +1208,8 @@ json_parser_get_current_pos (JsonParser *parser)
/**
* json_parser_has_assignment:
* @parser: a #JsonParser
- * @variable_name: return location for the variable name, or %NULL
+ * @variable_name: (out) (allow-none): Return location for the variable
+ * name, or %NULL
*
* A JSON data stream might sometimes contain an assignment, like:
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]