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

Function xmlNewEntityRef

ThirdParty/libxml2/vtklibxml2/tree.c:2396–2417  ·  view source on GitHub ↗

* xmlNewEntityRef: * @doc: the target document (optional) * @name: the entity name * * Create an empty entity reference node. This function doesn't attempt * to look up the entity in @doc. * * @name is consumed. * * Returns a pointer to the new node object or NULL if arguments are * invalid or a memory allocation failed. */

Source from the content-addressed store, hash-verified

2394 * invalid or a memory allocation failed.
2395 */
2396static xmlNodePtr
2397xmlNewEntityRef(xmlDocPtr doc, xmlChar *name) {
2398 xmlNodePtr cur;
2399
2400 /*
2401 * Allocate a new node and fill the fields.
2402 */
2403 cur = (xmlNodePtr) xmlMalloc(sizeof(xmlNode));
2404 if (cur == NULL) {
2405 xmlFree(name);
2406 return(NULL);
2407 }
2408 memset(cur, 0, sizeof(xmlNode));
2409 cur->type = XML_ENTITY_REF_NODE;
2410 cur->doc = doc;
2411 cur->name = name;
2412
2413 if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue))
2414 xmlRegisterNodeDefaultValue(cur);
2415
2416 return(cur);
2417}
2418
2419/**
2420 * xmlNewCharRef:

Callers 2

xmlNewCharRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected