summaryrefslogtreecommitdiff
path: root/testchar.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2012-07-16 14:59:29 +0800
committerDaniel Veillard <veillard@redhat.com>2012-07-23 14:24:27 +0800
commit145477d8ab5d6802529b1213220f108ad23d3827 (patch)
tree81e4714913c0122581d6534672f38ac858387f57 /testchar.c
parent7b9b07198fa8f223085032f3e258f00731869e3f (diff)
downloadlibxml2-145477d8ab5d6802529b1213220f108ad23d3827.tar.gz
Swicth the test program for characters to new input buffers
it was manipulating the buffer content and structures directly this cleans it up
Diffstat (limited to 'testchar.c')
-rw-r--r--testchar.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/testchar.c b/testchar.c
index 3bfd9c07..55821ab4 100644
--- a/testchar.c
+++ b/testchar.c
@@ -10,6 +10,8 @@
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
+#include "buf.h"
+
int lastError;
static void errorHandler(void *unused, xmlErrorPtr err) {
@@ -558,9 +560,9 @@ static void testCharRanges(void) {
}
input->filename = NULL;
input->buf = buf;
- input->base = input->buf->buffer->content;
- input->cur = input->buf->buffer->content;
- input->end = &input->buf->buffer->content[4];
+ input->cur =
+ input->base = xmlBufContent(input->buf->buffer);
+ input->end = input->base + 4;
inputPush(ctxt, input);
printf("testing char range: 1");