| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
builder: Don't leak memory if json_builder_get_root fails sanity check
See merge request GNOME/json-glib!46
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Coverity noticed a leak in json_builder_get_root that can't happen
in practice. Namely, if internal state gets screwed up and runtime checks
are enabled, json_builder_get_root may return NULL without freeing a copy of the
builder root it just made.
This is because of a g_return_val_if_fail call to bail early if an
internal consistency sanity check fails.
This commit addresses the coverity complaint by using g_assert instead
of g_return_val_if_fail for this sanity check, and other similar
sanity checks, in the code.
|
|/
|
|
|
|
| |
Delete an extra word
Line: 55
Word: root
|
|
|
|
| |
Use gi-docgen links, and drop gtk-doc'isms.
|
|
|
|
|
|
|
|
|
|
| |
Drop `SECTION` blurbs.
Use gi-docgen syntax for internal links.
Use summary lines for gi-docgen indices.
Use Markdown syntax for code fragments.
|
|
|
|
|
| |
We shouldn't rely on g-ir-scanner doing pattern matching on the name of
the function to determine if it's a constructor or not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
methods
json_builder_add_boolean_value
json_builder_add_double_value
json_builder_add_int_value
json_builder_add_null_value
json_builder_add_string_value
json_builder_add_value
json_builder_begin_array
json_builder_begin_object
json_builder_end_array
json_builder_end_object
json_builder_get_root
json_builder_set_member_name
json_generator_get_root
json_reader_get_error
json_reader_get_member_name
json_reader_get_value
json_serializable_find_property
json_serializable_find_property
json_boxed_serialize
|
|
|
|
| |
The newly added API is available since 1.2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add reference counting semantics to JsonNode, in addition to the
existing init/unset and alloc/free semantics.
json_node_free() must only be used with nodes allocated using
json_node_alloc(). json_node_unref() may be used with all nodes (if
correctly paired; it may be paired with json_node_alloc()).
It is not valid to call json_node_free() on a node whose reference count
is not 1.
https://bugzilla.gnome.org/show_bug.cgi?id=756121
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Document and annotate the fact that json_builder_add_value() takes
ownership of the JsonNode passed in to it.
https://bugzilla.gnome.org/show_bug.cgi?id=743475
|
|
|
|
| |
All the platforms and build system we support have a config.h header.
|
|
|
|
|
| |
Drop the DocBook documentation, and move everything to the MarkDown
format used by modern gtk-doc.
|
|
|
|
| |
We can use the autogenerated get_instance_private() function.
|
|
|
|
|
| |
We depend on a new version of GLib, so we can remove a bunch of old
version checks.
|
|
|
|
|
|
|
|
| |
If we're being compiled against a newer version of GLib, we should use
the new macros that add instance private data.
Since this is a stable branch, we cannot bump the GLib requirement; so
we use version checks to conditionally compile the new code.
|
|
|
|
| |
Function arguments should be aligned on different lines.
|
|
|
|
|
|
|
| |
If we're calling g_free() on a field we better make sure that it's either
NULL or contains valid data.
https://bugzilla.gnome.org/show_bug.cgi?id=651271
|
| |
|
|
|
|
|
| |
And silence gtk-doc-scanner by removing an undefined argument from
json_builder_add_null_value().
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=621141
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
|