summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2010-01-24 18:58:28 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2010-01-24 19:00:18 +0000
commita5d9c7bd125571c877f1f7b76f92412b37fc4ce4 (patch)
tree8b6113f1ec21e29246fdb55c354b12d5dacc16a1
parent1ce1d549477b79e7d94fb891f323afbdb8a8d4ce (diff)
downloadjson-glib-a5d9c7bd125571c877f1f7b76f92412b37fc4ce4.tar.gz
docs: Fix the GBoxed registration example
The registration function for serialization and deserialization has been replaced by two separate functions before releasing 0.10, but I forgot to update the example in the documentation. (cherry picked from commit ea666891cb1e6fc9e527ce6c93a306bc97145f16)
-rw-r--r--json-glib/json-gboxed.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/json-glib/json-gboxed.c b/json-glib/json-gboxed.c
index fd2ebb9..cf8e545 100644
--- a/json-glib/json-gboxed.c
+++ b/json-glib/json-gboxed.c
@@ -45,9 +45,10 @@
* (GBoxedCopyFunc) my_struct_copy,
* (GBoxedFreeFunc) my_struct_free);
*
- * json_boxed_register_transform_func (boxed_type, JSON_NODE_OBJECT,
- * my_struct_serialize,
- * my_struct_deserialize);
+ * json_boxed_register_serialize_func (boxed_type, JSON_NODE_OBJECT,
+ * my_struct_serialize);
+ * json_boxed_register_deserialize_func (boxed_type, JSON_NODE_OBJECT,
+ * my_struct_deserialize);
* }
*
* return boxed_type;
@@ -57,8 +58,8 @@
* The serialization function will be invoked by json_boxed_serialize():
* it will be passed a pointer to the C structure and it must return a
* #JsonNode. The deserialization function will be invoked by
- * json_boxed_deserialize(): it will be passed a #JsonNode and it must
- * return a newly allocated C structure.
+ * json_boxed_deserialize(): it will be passed a #JsonNode for the
+ * declared type and it must return a newly allocated C structure.
*
* It is possible to check whether a #GBoxed type can be deserialized
* from a specific #JsonNodeType, and whether a #GBoxed can be serialized