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

Function xmlCreateEnumeration

ThirdParty/libxml2/vtklibxml2/valid.c:1484–1502  ·  view source on GitHub ↗

* xmlCreateEnumeration: * @name: the enumeration name or NULL * * create and initialize an enumeration attribute node. * * Returns the xmlEnumerationPtr just created or NULL in case * of error. */

Source from the content-addressed store, hash-verified

1482 * of error.
1483 */
1484xmlEnumerationPtr
1485xmlCreateEnumeration(const xmlChar *name) {
1486 xmlEnumerationPtr ret;
1487
1488 ret = (xmlEnumerationPtr) xmlMalloc(sizeof(xmlEnumeration));
1489 if (ret == NULL)
1490 return(NULL);
1491 memset(ret, 0, sizeof(xmlEnumeration));
1492
1493 if (name != NULL) {
1494 ret->name = xmlStrdup(name);
1495 if (ret->name == NULL) {
1496 xmlFree(ret);
1497 return(NULL);
1498 }
1499 }
1500
1501 return(ret);
1502}
1503
1504/**
1505 * xmlFreeEnumeration:

Callers 3

xmlCopyEnumerationFunction · 0.85
xmlParseNotationTypeFunction · 0.85
xmlParseEnumerationTypeFunction · 0.85

Calls 1

xmlStrdupFunction · 0.85

Tested by

no test coverage detected