From 145477d8ab5d6802529b1213220f108ad23d3827 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 16 Jul 2012 14:59:29 +0800 Subject: Swicth the test program for characters to new input buffers it was manipulating the buffer content and structures directly this cleans it up --- testchar.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'testchar.c') diff --git a/testchar.c b/testchar.c index 3bfd9c07..55821ab4 100644 --- a/testchar.c +++ b/testchar.c @@ -10,6 +10,8 @@ #include #include +#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"); -- cgit v1.2.1