diff options
author | Emmanuele Bassi <ebassi@openedhand.com> | 2007-10-05 11:57:53 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@openedhand.com> | 2007-10-05 11:57:53 +0100 |
commit | aa2b31234f7cfac63b870e8d9d74e682b3121d4a (patch) | |
tree | a40f58176289391ed6b5d7fe745d91aa548c5fdf /json-glib/json-array.c | |
parent | bd41854505f47d2176ea4cfba8083ce998c482cc (diff) | |
download | json-glib-aa2b31234f7cfac63b870e8d9d74e682b3121d4a.tar.gz |
Implement the GType functions for JsonObject and JsonArray
The type functions for the JsonObject and JsonArray types were declared,
albeit with the wrong return value, but not implemented. This commit
fixed the return value and implements them.
JsonObject and JsonArray are boxed types because we don't need them to
be GObjects (no signals, no inheritance and their implementation must be
completely opaque for the developer).
Diffstat (limited to 'json-glib/json-array.c')
-rw-r--r-- | json-glib/json-array.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/json-glib/json-array.c b/json-glib/json-array.c index 4b17825..e9727e8 100644 --- a/json-glib/json-array.c +++ b/json-glib/json-array.c @@ -44,6 +44,19 @@ struct _JsonArray volatile gint ref_count; }; +GType +json_array_get_type (void) +{ + static GType array_type = 0; + + if (G_UNLIKELY (!array_type)) + array_type = g_boxed_type_register_static ("JsonArray", + (GBoxedCopyFunc) json_array_ref, + (GBoxedFreeFunc) json_array_unref); + + return array_type; +} + /** * json_array_new: * |