MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlSchemaSAXUnplug

Function xmlSchemaSAXUnplug

ThirdParty/libxml2/vtklibxml2/xmlschemas.c:28603–28625  ·  view source on GitHub ↗

* xmlSchemaSAXUnplug: * @plug: a data structure returned by xmlSchemaSAXPlug * * Unplug a SAX based validation layer in a SAX parsing event flow. * The original pointers used in the call are restored. * * Returns 0 in case of success and -1 in case of failure. */

Source from the content-addressed store, hash-verified

28601 * Returns 0 in case of success and -1 in case of failure.
28602 */
28603int
28604xmlSchemaSAXUnplug(xmlSchemaSAXPlugPtr plug)
28605{
28606 xmlSAXHandlerPtr *sax;
28607 void **user_data;
28608
28609 if ((plug == NULL) || (plug->magic != XML_SAX_PLUG_MAGIC))
28610 return(-1);
28611 plug->magic = 0;
28612
28613 xmlSchemaPostRun(plug->ctxt);
28614 /* restore the data */
28615 sax = plug->user_sax_ptr;
28616 *sax = plug->user_sax;
28617 if (plug->user_sax != NULL) {
28618 user_data = plug->user_data_ptr;
28619 *user_data = plug->user_data;
28620 }
28621
28622 /* free and return */
28623 xmlFree(plug);
28624 return(0);
28625}
28626
28627/**
28628 * xmlSchemaValidateSetLocator:

Callers 4

xmlFreeTextReaderFunction · 0.85
xmlTextReaderSetSchemaFunction · 0.85

Calls 1

xmlSchemaPostRunFunction · 0.85

Tested by

no test coverage detected