MCPcopy Create free account
hub / github.com/Kitware/CMake / dtdDestroy

Function dtdDestroy

Utilities/cmexpat/lib/xmlparse.c:7562–7587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7560}
7561
7562static void
7563dtdDestroy(DTD *p, XML_Bool isDocEntity, XML_Parser parser) {
7564 HASH_TABLE_ITER iter;
7565 hashTableIterInit(&iter, &(p->elementTypes));
7566 for (;;) {
7567 ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
7568 if (! e)
7569 break;
7570 if (e->allocDefaultAtts != 0)
7571 FREE(parser, e->defaultAtts);
7572 }
7573 hashTableDestroy(&(p->generalEntities));
7574#ifdef XML_DTD
7575 hashTableDestroy(&(p->paramEntities));
7576#endif /* XML_DTD */
7577 hashTableDestroy(&(p->elementTypes));
7578 hashTableDestroy(&(p->attributeIds));
7579 hashTableDestroy(&(p->prefixes));
7580 poolDestroy(&(p->pool));
7581 poolDestroy(&(p->entityValuePool));
7582 if (isDocEntity) {
7583 FREE(parser, p->scaffIndex);
7584 FREE(parser, p->scaffold);
7585 }
7586 FREE(parser, p);
7587}
7588
7589/* Do a deep copy of the DTD. Return 0 for out of memory, non-zero otherwise.
7590 The new DTD has already been initialized.

Callers 1

XML_ParserFreeFunction · 0.85

Calls 4

hashTableIterInitFunction · 0.85
hashTableIterNextFunction · 0.85
hashTableDestroyFunction · 0.85
poolDestroyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…