summaryrefslogtreecommitdiff
path: root/rest/rest-xml-node.c
Commit message (Collapse)AuthorAgeFilesLines
* xml-node: Define the order in which attributes & children are printedDebarshi Ray2017-10-161-1/+22
| | | | | | | | | | | | | 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
* xml-node: Unbreak the creation of top-level nodesDebarshi Ray2017-10-161-1/+0
| | | | | | | | | | 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
* xml-node: Remove stray blank spaceDebarshi Ray2017-10-161-1/+1
| | | | | | | | This had broken tests/xml.c. Fallout from 61a7b231bd8b9d1b8d02dca120389e79d38b428d https://bugzilla.gnome.org/show_bug.cgi?id=788960
* Add more missing precondition checksTimm Bäder2016-07-141-2/+12
|
* xml-node: Use GString in rest_xml_node_print()Christophe Fergeau2016-06-201-9/+12
| | | | | | | | | | | | | | | | | | 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)
* xml-node: Remove deprecated APITimm Bäder2016-06-161-6/+0
|
* Fix rest_xml_node_print name in gtk-doc annotationChristophe Fergeau2014-08-251-1/+1
|
* Fix annotationsEmmanuele Bassi2014-03-101-3/+3
| | | | | | Syntax matters. https://bugzilla.gnome.org/show_bug.cgi?id=712747
* rest-xml-node: skip ref/unref() methods in introspectionDanielle Madeley2012-03-271-2/+2
| | | | They're not needed in introspected languages.
* xml-node: API for manually constructing and outputting XMLTomas Frydrych2011-02-101-0/+399
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