@@ -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
29782982xmlRegisterInputCallbacks (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) {
30093015int
30103016xmlPopInputCallbacks (void )
30113017{
3018+ xmlInitParser ();
3019+
30123020 if (xmlInputCallbackNr <= 0 )
30133021 return (-1 );
30143022
@@ -3026,6 +3034,8 @@ xmlPopInputCallbacks(void)
30263034void
30273035xmlCleanupInputCallbacks (void )
30283036{
3037+ xmlInitParser ();
3038+
30293039 xmlInputCallbackNr = 0 ;
30303040}
30313041
@@ -3045,6 +3055,8 @@ int
30453055xmlRegisterOutputCallbacks (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) {
30763088int
30773089xmlPopOutputCallbacks (void )
30783090{
3091+ xmlInitParser ();
3092+
30793093 if (xmlOutputCallbackNr <= 0 )
30803094 return (-1 );
30813095
@@ -3093,6 +3107,8 @@ xmlPopOutputCallbacks(void)
30933107void
30943108xmlCleanupOutputCallbacks (void )
30953109{
3110+ xmlInitParser ();
3111+
30963112 xmlOutputCallbackNr = 0 ;
30973113}
30983114
0 commit comments