From 58f479b60eb2db4c73605d469d68a8ffd8679327 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sat, 7 Nov 2015 14:17:31 +0100 Subject: core: Add immutability support to core objects Add an immutable mode to JsonNode, JsonObject, JsonArray and JsonValue. This is an optional mode which objects enter by calling json_*_seal(). It is a one-way transition, which means that we can build and manipulate objects as much as desired, before sealing them and enjoying the benefits of immutable objects: no need to take copies when handling them, persistent hash values (still to be implemented). https://bugzilla.gnome.org/show_bug.cgi?id=756121 --- json-glib/json-parser.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'json-glib/json-parser.h') diff --git a/json-glib/json-parser.h b/json-glib/json-parser.h index a65558e..c7223d2 100644 --- a/json-glib/json-parser.h +++ b/json-glib/json-parser.h @@ -147,6 +147,8 @@ GType json_parser_get_type (void) G_GNUC_CONST; JSON_AVAILABLE_IN_1_0 JsonParser *json_parser_new (void); +JSON_AVAILABLE_IN_1_2 +JsonParser *json_parser_new_immutable (void); JSON_AVAILABLE_IN_1_0 gboolean json_parser_load_from_file (JsonParser *parser, const gchar *filename, -- cgit v1.2.1