| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The order in which GHashTable returns its key-value pairs is undefined.
Therefore the output of rest_xml_node_print can change based on the
GHashTable implementation. While not strictly necessary, it would be
nice to avoid that. Having a stable order, even if it is not
documented and depends on the current RestXmlNode code, is handy for
testing.
This was the main reason behind the tests/xml.c breakage.
https://bugzilla.gnome.org/show_bug.cgi?id=788960
|
|
|
|
|
|
|
|
|
|
| |
The rest_xml_node_add_child API explicitly documents NULL parents as
the way to create top-level nodes. This had broken the second half of
tests/xml.c.
Fallout from b11a1664cd4dfcc62b07b4a68adc220fd1eb8305
https://bugzilla.gnome.org/show_bug.cgi?id=788960
|
|
|
|
|
|
|
|
| |
This had broken tests/xml.c.
Fallout from 61a7b231bd8b9d1b8d02dca120389e79d38b428d
https://bugzilla.gnome.org/show_bug.cgi?id=788960
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current code is using xml = g_strconcat (xml, ...) which is causing
some leaks as g_strconcat returns a newly allocated string. Using
GString avoids this issue without constantly freeing the intermediate
strings.
This fixes multiple leaks like:
==16611== 18 bytes in 1 blocks are definitely lost in loss record 124 of 301
==16611== at 0x4C2BBAD: malloc (vg_replace_malloc.c:299)
==16611== by 0x5F5CE58: g_malloc (gmem.c:94)
==16611== by 0x5F75B8E: g_strconcat (gstrfuncs.c:585)
==16611== by 0x4E450CF: rest_xml_node_print (rest-xml-node.c:287)
==16611== by 0x4E451DA: rest_xml_node_print (rest-xml-node.c:305)
==16611== by 0x4E450F8: rest_xml_node_print (rest-xml-node.c:292)
==16611== by 0x4009A0: main (xml.c:40)
|
| |
|
| |
|
|
|
|
|
|
| |
Syntax matters.
https://bugzilla.gnome.org/show_bug.cgi?id=712747
|
|
|
|
| |
They're not needed in introspected languages.
|
|
Split out RestXmlNode into separate source files and added simple API for
manually constructing tree of RextXmlNodes and converting such a tree to a
string:
* xml_node_add_child()
* xml_node_add_attribute()
* xml_node_set_content()
* xml_node_print()
Includes xml test for make check
|