Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit b93d4e7

Browse files
committed
io: Add missing calls to xmlInitParser
This is required after c9a46a9. Should fix #782.
1 parent 3a95572 commit b93d4e7

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

xmlIO.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,8 @@ xmlParserInputBufferCreateFilenameInt(const char *URI, xmlCharEncoding enc,
15721572
int ret;
15731573
int i;
15741574

1575+
xmlInitParser();
1576+
15751577
*out = NULL;
15761578
if (URI == NULL)
15771579
return(XML_ERR_ARGUMENT);
@@ -1679,6 +1681,8 @@ __xmlOutputBufferCreateFilename(const char *URI,
16791681
int i = 0;
16801682
char *unescaped = NULL;
16811683

1684+
xmlInitParser();
1685+
16821686
if (URI == NULL)
16831687
return(NULL);
16841688

@@ -2978,6 +2982,8 @@ int
29782982
xmlRegisterInputCallbacks(xmlInputMatchCallback matchFunc,
29792983
xmlInputOpenCallback openFunc, xmlInputReadCallback readFunc,
29802984
xmlInputCloseCallback closeFunc) {
2985+
xmlInitParser();
2986+
29812987
if (xmlInputCallbackNr >= MAX_INPUT_CALLBACK) {
29822988
return(-1);
29832989
}
@@ -3009,6 +3015,8 @@ xmlRegisterDefaultInputCallbacks(void) {
30093015
int
30103016
xmlPopInputCallbacks(void)
30113017
{
3018+
xmlInitParser();
3019+
30123020
if (xmlInputCallbackNr <= 0)
30133021
return(-1);
30143022

@@ -3026,6 +3034,8 @@ xmlPopInputCallbacks(void)
30263034
void
30273035
xmlCleanupInputCallbacks(void)
30283036
{
3037+
xmlInitParser();
3038+
30293039
xmlInputCallbackNr = 0;
30303040
}
30313041

@@ -3045,6 +3055,8 @@ int
30453055
xmlRegisterOutputCallbacks(xmlOutputMatchCallback matchFunc,
30463056
xmlOutputOpenCallback openFunc, xmlOutputWriteCallback writeFunc,
30473057
xmlOutputCloseCallback closeFunc) {
3058+
xmlInitParser();
3059+
30483060
if (xmlOutputCallbackNr >= MAX_OUTPUT_CALLBACK) {
30493061
return(-1);
30503062
}
@@ -3076,6 +3088,8 @@ xmlRegisterDefaultOutputCallbacks (void) {
30763088
int
30773089
xmlPopOutputCallbacks(void)
30783090
{
3091+
xmlInitParser();
3092+
30793093
if (xmlOutputCallbackNr <= 0)
30803094
return(-1);
30813095

@@ -3093,6 +3107,8 @@ xmlPopOutputCallbacks(void)
30933107
void
30943108
xmlCleanupOutputCallbacks(void)
30953109
{
3110+
xmlInitParser();
3111+
30963112
xmlOutputCallbackNr = 0;
30973113
}
30983114

0 commit comments

Comments
 (0)