diff --git a/encoding.c b/encoding.c index 4cf938b4..07933373 100644 --- a/encoding.c +++ b/encoding.c @@ -34,6 +34,7 @@ #include #include +#include #ifdef LIBXML_HTML_ENABLED #include #endif diff --git a/include/libxml/encoding.h b/include/libxml/encoding.h index 91fe87d7..8594cffc 100644 --- a/include/libxml/encoding.h +++ b/include/libxml/encoding.h @@ -151,14 +151,6 @@ struct _xmlCharEncodingHandler { #endif /* LIBXML_ICU_ENABLED */ }; -#ifdef __cplusplus -} -#endif -#include -#ifdef __cplusplus -extern "C" { -#endif - /* * Interfaces for encoding handlers. */ @@ -203,20 +195,21 @@ XMLPUBFUN xmlCharEncoding xmlDetectCharEncoding (const unsigned char *in, int len); +struct _xmlBuffer; XMLPUBFUN int xmlCharEncOutFunc (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); + struct _xmlBuffer *out, + struct _xmlBuffer *in); XMLPUBFUN int xmlCharEncInFunc (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); + struct _xmlBuffer *out, + struct _xmlBuffer *in); XML_DEPRECATED XMLPUBFUN int xmlCharEncFirstLine (xmlCharEncodingHandler *handler, - xmlBufferPtr out, - xmlBufferPtr in); + struct _xmlBuffer *out, + struct _xmlBuffer *in); XMLPUBFUN int xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h index b5d62a45..0c5c6695 100644 --- a/include/libxml/xmlIO.h +++ b/include/libxml/xmlIO.h @@ -13,6 +13,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -140,16 +141,6 @@ typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc)(const char *URI, xmlCharEncodingHandlerPtr encoder, int compression); -#ifdef __cplusplus -} -#endif - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif struct _xmlParserInputBuffer { void* context; xmlInputReadCallback readcallback;