diff options
author | Emmanuele Bassi <ebassi@openedhand.com> | 2007-10-01 16:25:11 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@openedhand.com> | 2007-10-01 16:25:11 +0100 |
commit | 2211e4e60b90b92d868c9b5f6b61e133d2435b4d (patch) | |
tree | 191221f785771fe0f0a0b0b4ce80f2f47333f20e /json-glib/json-node.c | |
parent | 29feafc236f888021b817fdfe0cfe685f5e3b65e (diff) | |
download | json-glib-2211e4e60b90b92d868c9b5f6b61e133d2435b4d.tar.gz |
Implement json_node_get_parent()
It seems that the parent accessor fell through. This commit implements
the declared json_node_get_parent() function.
Diffstat (limited to 'json-glib/json-node.c')
-rw-r--r-- | json-glib/json-node.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/json-glib/json-node.c b/json-glib/json-node.c index 2758585..8be735e 100644 --- a/json-glib/json-node.c +++ b/json-glib/json-node.c @@ -303,3 +303,19 @@ json_node_type_name (JsonNode *node) return "unknown"; } + +/** + * json_node_get_parent: + * @node: a #JsonNode + * + * Retrieves the parent #JsonNode of @node. + * + * Return value: the parent node, or %NULL if @node is the root node + */ +JsonNode * +json_node_get_parent (JsonNode *node) +{ + g_return_val_if_fail (node != NULL, NULL); + + return node->parent; +} |