summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Cavallari <nicolas.cavallari@green-communications.fr>2021-07-05 16:13:48 +0200
committerNicolas Cavallari <nicolas.cavallari@green-communications.fr>2021-07-05 16:14:36 +0200
commit76186fb89e66963810e28c7111c76525751da43c (patch)
treea8a2132f1ae91ceda85ff067c497e0c1602de958
parent6a0584a59a963554ffc1d8dea98bfec25b354d44 (diff)
downloadlibexpat-git-76186fb89e66963810e28c7111c76525751da43c.tar.gz
doc/reference.html: Docmument that XML_GetBuffers(parser, 0) may be NULL
Allocating zero bytes with XML_GetBuffers may return NULL or a non-NULL pointer depending on the current internal buffer state (#502). Document this behavior, as it can be surprising.
-rw-r--r--expat/doc/reference.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/expat/doc/reference.html b/expat/doc/reference.html
index 309cb241..e4790eac 100644
--- a/expat/doc/reference.html
+++ b/expat/doc/reference.html
@@ -1115,7 +1115,8 @@ XML_GetBuffer(XML_Parser p,
<div class="fcndef">
Obtain a buffer of size <code>len</code> to read a piece of the document
into. A NULL value is returned if Expat can't allocate enough memory for
-this buffer. This has to be called prior to every call to
+this buffer. A NULL value may also be returned if <code>len</code> is zero.
+This has to be called prior to every call to
<code><a href= "#XML_ParseBuffer" >XML_ParseBuffer</a></code>. A
typical use would look like this: