summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2012-12-28 18:18:23 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-28 08:58:44 -0800
commit8bce372eb1b0f6aa5c6a69c552a13845973ea694 (patch)
treea99379529c084cc5f5071b77d1ed4072ee36794a /main.c
parentdf613bf107ce98705d01a0bf63fb22257ca25187 (diff)
downloadsubsurface-8bce372eb1b0f6aa5c6a69c552a13845973ea694.tar.gz
Don't allocate an intermediate buffer for most parsed xmlNode contents
parse-xml.c: Instead of always allocating a buffer when parsing a node, only do so for "strings" in the utf8_string() function. Also move the whitespace trimming of node contents in there. This change also requires that most parsing functions don't free the passed buffer, as it will be part of memory allocated by libxml2. visit_one_node(), now also has a xmlIsBlankNode() check, where if 1 is returned, the node contains only whitespace or is empty and should not be processed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'main.c')
0 files changed, 0 insertions, 0 deletions