diff options
author | Emmanuele Bassi <ebassi@openedhand.com> | 2007-11-21 20:05:07 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@openedhand.com> | 2007-11-21 20:05:07 +0000 |
commit | 0b6b09c0fe2fdd21b18593192e7213d1b0098f12 (patch) | |
tree | 415393e8d42ed8bbbaf042437004313f3421e2da /json-glib/json-parser.h | |
parent | 5f110dc5ad338497c95418b9ad1b267c95fb8ded (diff) | |
download | json-glib-0b6b09c0fe2fdd21b18593192e7213d1b0098f12.tar.gz |
Change json_parser_get_root() semantics
The json_parser_get_root() returns a pointer to the root node. This does
not conform to the API naming convention inherited from GLib, where
functions returning an internal pointer are called "peek" and function
returning a copy are called "get".
Thus, json_parser_get_root() will now return a copy of the root node and
it is left to the developer to free the returned JsonNode.
A function returning the pointer has also been added, and it's called
json_parser_peek_root().
Diffstat (limited to 'json-glib/json-parser.h')
-rw-r--r-- | json-glib/json-parser.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/json-glib/json-parser.h b/json-glib/json-parser.h index 37324a9..c7fd570 100644 --- a/json-glib/json-parser.h +++ b/json-glib/json-parser.h @@ -140,6 +140,8 @@ gboolean json_parser_load_from_data (JsonParser *parser, const gchar *data, gsize length, GError **error); + +JsonNode * json_parser_peek_root (JsonParser *parser); JsonNode * json_parser_get_root (JsonParser *parser); guint json_parser_get_current_line (JsonParser *parser); |