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

Function xmlFreeProp

ThirdParty/libxml2/vtklibxml2/tree.c:1920–1937  ·  view source on GitHub ↗

* xmlFreeProp: * @cur: an attribute * * Free an attribute including all children. */

Source from the content-addressed store, hash-verified

1918 * Free an attribute including all children.
1919 */
1920void
1921xmlFreeProp(xmlAttrPtr cur) {
1922 xmlDictPtr dict = NULL;
1923 if (cur == NULL) return;
1924
1925 if (cur->doc != NULL) dict = cur->doc->dict;
1926
1927 if ((__xmlRegisterCallbacks) && (xmlDeregisterNodeDefaultValue))
1928 xmlDeregisterNodeDefaultValue((xmlNodePtr)cur);
1929
1930 /* Check for ID removal -> leading to invalid references ! */
1931 if ((cur->doc != NULL) && (cur->atype == XML_ATTRIBUTE_ID)) {
1932 xmlRemoveID(cur->doc, cur);
1933 }
1934 if (cur->children != NULL) xmlFreeNodeList(cur->children);
1935 DICT_FREE(cur->name)
1936 xmlFree(cur);
1937}
1938
1939/**
1940 * xmlRemoveProp:

Callers 8

xmlNewPropInternalFunction · 0.85
xmlNewDocPropFunction · 0.85
xmlFreePropListFunction · 0.85
xmlRemovePropFunction · 0.85
xmlFreeNodeFunction · 0.85
xmlCopyPropInternalFunction · 0.85
xmlUnsetPropFunction · 0.85
xmlUnsetNsPropFunction · 0.85

Calls 2

xmlRemoveIDFunction · 0.85
xmlFreeNodeListFunction · 0.85

Tested by

no test coverage detected