mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-12 09:17:37 +03:00
Add xmlPopOutputCallbacks
Add function to pop a single set of output callbacks from the stack. This was only implemented for input callbacks before. Fixes #135.
This commit is contained in:
parent
b07251215e
commit
c2e09f445c
@ -1768,4 +1768,7 @@
|
|||||||
<release version="2.9.8">
|
<release version="2.9.8">
|
||||||
<symbol file="hash">xmlHashDefaultDeallocator</symbol>
|
<symbol file="hash">xmlHashDefaultDeallocator</symbol>
|
||||||
</release>
|
</release>
|
||||||
|
<release version="2.9.11">
|
||||||
|
<symbol file="xmlIO">xmlPopOutputCallbacks</symbol>
|
||||||
|
</release>
|
||||||
</symbols>
|
</symbols>
|
||||||
|
@ -217,6 +217,8 @@ xmlParserInputBufferPtr
|
|||||||
*/
|
*/
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlCleanupOutputCallbacks (void);
|
xmlCleanupOutputCallbacks (void);
|
||||||
|
XMLPUBFUN int XMLCALL
|
||||||
|
xmlPopOutputCallbacks (void);
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlRegisterDefaultOutputCallbacks(void);
|
xmlRegisterDefaultOutputCallbacks(void);
|
||||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||||
|
@ -2286,3 +2286,10 @@ LIBXML2_2.9.8 {
|
|||||||
xmlHashDefaultDeallocator;
|
xmlHashDefaultDeallocator;
|
||||||
} LIBXML2_2.9.1;
|
} LIBXML2_2.9.1;
|
||||||
|
|
||||||
|
LIBXML2_2.9.11 {
|
||||||
|
global:
|
||||||
|
|
||||||
|
# xmlIO
|
||||||
|
xmlPopOutputCallbacks;
|
||||||
|
} LIBXML2_2.9.8;
|
||||||
|
|
||||||
|
27
xmlIO.c
27
xmlIO.c
@ -560,6 +560,33 @@ xmlCleanupOutputCallbacks(void)
|
|||||||
xmlOutputCallbackNr = 0;
|
xmlOutputCallbackNr = 0;
|
||||||
xmlOutputCallbackInitialized = 0;
|
xmlOutputCallbackInitialized = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlPopOutputCallbacks:
|
||||||
|
*
|
||||||
|
* Remove the top output callbacks from the output stack. This includes the
|
||||||
|
* compiled-in I/O.
|
||||||
|
*
|
||||||
|
* Returns the number of output callback registered or -1 in case of error.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
xmlPopOutputCallbacks(void)
|
||||||
|
{
|
||||||
|
if (!xmlOutputCallbackInitialized)
|
||||||
|
return(-1);
|
||||||
|
|
||||||
|
if (xmlOutputCallbackNr <= 0)
|
||||||
|
return(-1);
|
||||||
|
|
||||||
|
xmlOutputCallbackNr--;
|
||||||
|
xmlOutputCallbackTable[xmlOutputCallbackNr].matchcallback = NULL;
|
||||||
|
xmlOutputCallbackTable[xmlOutputCallbackNr].opencallback = NULL;
|
||||||
|
xmlOutputCallbackTable[xmlOutputCallbackNr].writecallback = NULL;
|
||||||
|
xmlOutputCallbackTable[xmlOutputCallbackNr].closecallback = NULL;
|
||||||
|
|
||||||
|
return(xmlOutputCallbackNr);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user