[libxml2] Convert catalog code to the new input buffers



commit 2a1d2422a4861efc2fd9f94c19ebfac2d119234a
Author: Daniel Veillard <veillard redhat com>
Date:   Mon Jul 16 14:38:14 2012 +0800

    Convert catalog code to the new input buffers
    
    Only one place where the buffers fields where accessed directly

 catalog.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/catalog.c b/catalog.c
index fb586c1..401e95c 100644
--- a/catalog.c
+++ b/catalog.c
@@ -41,6 +41,8 @@
 #include <libxml/threads.h>
 #include <libxml/globals.h>
 
+#include "buf.h"
+
 #define MAX_DELEGATE	50
 #define MAX_CATAL_DEPTH	50
 
@@ -912,10 +914,9 @@ xmlParseCatalogFile(const char *filename) {
 
     inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename);
     inputStream->buf = buf;
-    inputStream->base = inputStream->buf->buffer->content;
-    inputStream->cur = inputStream->buf->buffer->content;
-    inputStream->end = 
-	&inputStream->buf->buffer->content[inputStream->buf->buffer->use];
+    inputStream->cur =
+    inputStream->base = xmlBufContent(buf->buffer);
+    inputStream->end = xmlBufEnd(buf->buffer);
 
     inputPush(ctxt, inputStream);
     if ((ctxt->directory == NULL) && (directory == NULL))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]