[json-glib] docs: Fix the GBoxed registration example



commit ea666891cb1e6fc9e527ce6c93a306bc97145f16
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Sun Jan 24 18:58:28 2010 +0000

    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.

 json-glib/json-gboxed.c |   11 ++++++-----
 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]