diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2019-07-11 19:24:11 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2019-08-25 13:23:49 +0200 |
commit | 81958b6e94bce3b51effd1fa145daceab173b7a0 (patch) | |
tree | cf4ce0ab3eb0e10a24bccdeae54d55f81974c287 /xmlsave.c | |
parent | 59028ba08c7e035a9976ed492598fa8a50139801 (diff) | |
download | libxml2-81958b6e94bce3b51effd1fa145daceab173b7a0.tar.gz |
Doc: do not mislead towards "infeasible" scenario wrt. xmlBufNodeDump
At least when merely public API is to be leveraged, one cannot use
xmlBufCreate function that would otherwise be a clear fit, and relying
on some invariants wrt. how some other struct fields will get
initialized along the construction/filling such parent struct and
(ab)using that instead does not appear clever, either.
Hence, instruct people what's the Right Thing for the moment, that is,
make them use xmlNodeDumpOutput instead (together with likewise public
xmlAllocOutputBuffer).
Going forward, it's questionable what do with xmlBuf* family of
functions that are once public, since they, for any practical purpose,
cannot be used by the library clients (that's how I've run into this).
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'xmlsave.c')
-rw-r--r-- | xmlsave.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2186,9 +2186,9 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc, * * Dump an XML node, recursive behaviour,children are printed too. * Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 - * or xmlKeepBlanksDefault(0) was called + * or xmlKeepBlanksDefault(0) was called. * Since this is using xmlBuffer structures it is limited to 2GB and somehow - * deprecated, use xmlBufNodeDump() instead. + * deprecated, use xmlNodeDumpOutput() instead. * * Returns the number of bytes written to the buffer or -1 in case of error */ |