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

Function getElementType

Utilities/cmexpat/lib/xmlparse.c:8412–8433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8410}
8411
8412static ELEMENT_TYPE *
8413getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr,
8414 const char *end) {
8415 DTD *const dtd = parser->m_dtd; /* save one level of indirection */
8416 const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
8417 ELEMENT_TYPE *ret;
8418
8419 if (! name)
8420 return NULL;
8421 ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
8422 sizeof(ELEMENT_TYPE));
8423 if (! ret)
8424 return NULL;
8425 if (ret->name != name)
8426 poolDiscard(&dtd->pool);
8427 else {
8428 poolFinish(&dtd->pool);
8429 if (! setElementTypePrefix(parser, ret))
8430 return NULL;
8431 }
8432 return ret;
8433}
8434
8435static XML_Char *
8436copyString(const XML_Char *s, XML_Parser parser) {

Callers 1

doPrologFunction · 0.85

Calls 3

poolStoreStringFunction · 0.85
setElementTypePrefixFunction · 0.85
lookupFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…