summaryrefslogtreecommitdiff
path: root/ext/dom/node.c
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2012-08-24 10:55:17 +0200
committerDerick Rethans <github@derickrethans.nl>2012-08-24 10:55:17 +0200
commite5bfcd340a8e6aa9e46bef43894c78c06e80a3c8 (patch)
tree7e11e961bd43b1eb3af7149ce8af8b03d7f4ac2c /ext/dom/node.c
parent0a2833bbefd803a63014429973b14839718975e2 (diff)
parent13bcf685cb0a92e502ebe39f4b22c64304a9f333 (diff)
downloadphp-git-e5bfcd340a8e6aa9e46bef43894c78c06e80a3c8.tar.gz
Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3
Diffstat (limited to 'ext/dom/node.c')
-rw-r--r--ext/dom/node.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/dom/node.c b/ext/dom/node.c
index 5bcb234762..727d1bcef3 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -1895,9 +1895,17 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{
RETVAL_FALSE;
} else {
if (mode == 0) {
+#ifdef LIBXML2_NEW_BUFFER
+ ret = xmlOutputBufferGetSize(buf);
+#else
ret = buf->buffer->use;
+#endif
if (ret > 0) {
+#ifdef LIBXML2_NEW_BUFFER
+ RETVAL_STRINGL((char *) xmlOutputBufferGetContent(buf), ret, 1);
+#else
RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
+#endif
} else {
RETVAL_EMPTY_STRING();
}