diff options
author | Daniel Veillard <veillard@redhat.com> | 2012-07-11 16:48:47 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-07-23 14:24:26 +0800 |
commit | bca22f40c3b2b34169d8d2919dce4894d8eac1a4 (patch) | |
tree | 22aeb417d63e02385c90b22bace609a4f01432c1 /include | |
parent | 4629ee02ac649c27f9c0cf98ba017c6b5526070f (diff) | |
download | libxml2-bca22f40c3b2b34169d8d2919dce4894d8eac1a4.tar.gz |
Adding a new buf module for buffers
This also add converter functions between xmlBuf and xmlBuffer
* buf.c buf.h: the old xmlBuffer routines but modified for size_t
and using xmlBuf instead of xmlBuffer
* Makefile.am: add the 2 new files
* include/libxml/xmlerror.h: add an entry for the new module
* include/libxml/tree.h: expose the xmlBufPtr type but not the
structure which stay private
Diffstat (limited to 'include')
-rw-r--r-- | include/libxml/tree.h | 21 | ||||
-rw-r--r-- | include/libxml/xmlerror.h | 6 |
2 files changed, 24 insertions, 3 deletions
diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 2196f8db..7e821bb2 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -13,6 +13,7 @@ #define __XML_TREE_H__ #include <stdio.h> +#include <limits.h> #include <libxml/xmlversion.h> #include <libxml/xmlstring.h> @@ -81,7 +82,8 @@ typedef enum { /** * xmlBuffer: * - * A buffer structure. + * A buffer structure, this old construct is limited to 2GB and + * is being deprecated, use API with xmlBuf instead */ typedef struct _xmlBuffer xmlBuffer; typedef xmlBuffer *xmlBufferPtr; @@ -94,6 +96,23 @@ struct _xmlBuffer { }; /** + * xmlBuf: + * + * A buffer structure, new one, the actual structure internals are not public + */ + +typedef struct _xmlBuf xmlBuf; + +/** + * xmlBufPtr: + * + * A pointer to a buffer structure, the actual structure internals are not + * public + */ + +typedef xmlBuf *xmlBufPtr; + +/** * XML_XML_NAMESPACE: * * This is the namespace for the special xml: prefix predefined in the diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h index e9242112..85caf52b 100644 --- a/include/libxml/xmlerror.h +++ b/include/libxml/xmlerror.h @@ -62,7 +62,8 @@ typedef enum { XML_FROM_WRITER, /* The xmlwriter module */ XML_FROM_MODULE, /* The dynamically loaded module module*/ XML_FROM_I18N, /* The module handling character conversion */ - XML_FROM_SCHEMATRONV /* The Schematron validator module */ + XML_FROM_SCHEMATRONV,/* The Schematron validator module */ + XML_FROM_BUFFER /* The buffers module */ } xmlErrorDomain; /** @@ -825,7 +826,8 @@ typedef enum { XML_I18N_NO_HANDLER, /* 6001 */ XML_I18N_EXCESS_HANDLER, /* 6002 */ XML_I18N_CONV_FAILED, /* 6003 */ - XML_I18N_NO_OUTPUT /* 6004 */ + XML_I18N_NO_OUTPUT, /* 6004 */ + XML_BUF_OVERFLOW = 7000 #if 0 XML_CHECK_, /* 5033 */ XML_CHECK_X /* 503 */ |