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

Function xmlRelaxNGFreeValidState

ThirdParty/libxml2/vtklibxml2/relaxng.c:1355–1372  ·  view source on GitHub ↗

* xmlRelaxNGFreeValidState: * @state: a validation state structure * * Deallocate a RelaxNG validation state structure. */

Source from the content-addressed store, hash-verified

1353 * Deallocate a RelaxNG validation state structure.
1354 */
1355static void
1356xmlRelaxNGFreeValidState(xmlRelaxNGValidCtxtPtr ctxt,
1357 xmlRelaxNGValidStatePtr state)
1358{
1359 if (state == NULL)
1360 return;
1361
1362 if ((ctxt != NULL) && (ctxt->freeState == NULL)) {
1363 ctxt->freeState = xmlRelaxNGNewStates(ctxt, 40);
1364 }
1365 if ((ctxt == NULL) || (ctxt->freeState == NULL)) {
1366 if (state->attrs != NULL)
1367 xmlFree(state->attrs);
1368 xmlFree(state);
1369 } else {
1370 xmlRelaxNGAddStatesUniq(ctxt, ctxt->freeState, state);
1371 }
1372}
1373
1374/************************************************************************
1375 * *

Calls 2

xmlRelaxNGNewStatesFunction · 0.85
xmlRelaxNGAddStatesUniqFunction · 0.85

Tested by

no test coverage detected