encoding: Make init function private

This commit is contained in:
Nick Wellnhofer 2022-11-25 14:26:59 +01:00
parent 3e9d5e4f7f
commit 53ab38408d
3 changed files with 14 additions and 8 deletions

View File

@ -1482,16 +1482,20 @@ xmlNewCharEncodingHandler(const char *name,
/**
* xmlInitCharEncodingHandlers:
*
* DEPRECATED: This function will be made private. Call xmlInitParser to
* initialize the library.
*
* Initialize the char encoding support, it registers the default
* encoding supported.
* NOTE: while public, this function usually doesn't need to be called
* in normal processing.
* DEPRECATED: Alias for xmlInitParser.
*/
void
xmlInitCharEncodingHandlers(void) {
xmlInitParser();
}
/**
* xmlInitEncodingInternal:
*
* Initialize the char encoding support.
*/
void
xmlInitEncodingInternal(void) {
unsigned short int tst = 0x1234;
unsigned char *ptr = (unsigned char *) &tst;

View File

@ -4,6 +4,8 @@
#include <libxml/encoding.h>
#include <libxml/tree.h>
void xmlInitEncodingInternal(void);
int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
int xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
int xmlCharEncOutput(xmlOutputBufferPtr output, int init);

View File

@ -14503,7 +14503,7 @@ xmlInitParser(void) {
xmlInitGlobalsInternal();
xmlInitMemoryInternal();
__xmlInitializeDict();
xmlInitCharEncodingHandlers();
xmlInitEncodingInternal();
xmlRegisterDefaultInputCallbacks();
#ifdef LIBXML_OUTPUT_ENABLED
xmlRegisterDefaultOutputCallbacks();