summaryrefslogtreecommitdiff
path: root/json-glib/json-array.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@openedhand.com>2007-10-01 19:49:43 +0100
committerEmmanuele Bassi <ebassi@openedhand.com>2007-10-01 19:49:43 +0100
commitf09acae8e0d6ceba5d13de75551491835a7e71de (patch)
tree91c40f3780dd68e906de38fcb797b2bcddd6135a /json-glib/json-array.c
parent228a5e4efe65995778847f48d2be43f3df988e10 (diff)
downloadjson-glib-f09acae8e0d6ceba5d13de75551491835a7e71de.tar.gz
Document the new public functions
Now that we moved the constructors and setters for the JSON data types into the public symbols we need to document them to get back to 100% doc coverage.
Diffstat (limited to 'json-glib/json-array.c')
-rw-r--r--json-glib/json-array.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/json-glib/json-array.c b/json-glib/json-array.c
index 3de3244..4b17825 100644
--- a/json-glib/json-array.c
+++ b/json-glib/json-array.c
@@ -44,6 +44,13 @@ struct _JsonArray
volatile gint ref_count;
};
+/**
+ * json_array_new:
+ *
+ * Creates a new #JsonArray.
+ *
+ * Return value: the newly created #JsonArray
+ */
JsonArray *
json_array_new (void)
{
@@ -57,6 +64,14 @@ json_array_new (void)
return array;
}
+/**
+ * json_array_sized_new:
+ * @n_elements: number of slots to pre-allocate
+ *
+ * Creates a new #JsonArray with @n_elements slots already allocated.
+ *
+ * Return value: the newly created #JsonArray
+ */
JsonArray *
json_array_sized_new (guint n_elements)
{
@@ -185,6 +200,13 @@ json_array_get_length (JsonArray *array)
return array->elements->len;
}
+/**
+ * json_array_add_element:
+ * @array: a #JsonArray
+ * @node: a #JsonNode
+ *
+ * Appends @node inside @array.
+ */
void
json_array_add_element (JsonArray *array,
JsonNode *node)