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

Function xmlAddSpecialAttr

ThirdParty/libxml2/vtklibxml2/parser.c:1179–1199  ·  view source on GitHub ↗

* xmlAddSpecialAttr: * @ctxt: an XML parser context * @fullname: the element fullname * @fullattr: the attribute fullname * @type: the attribute type * * Register this attribute type */

Source from the content-addressed store, hash-verified

1177 * Register this attribute type
1178 */
1179static void
1180xmlAddSpecialAttr(xmlParserCtxtPtr ctxt,
1181 const xmlChar *fullname,
1182 const xmlChar *fullattr,
1183 int type)
1184{
1185 if (ctxt->attsSpecial == NULL) {
1186 ctxt->attsSpecial = xmlHashCreateDict(10, ctxt->dict);
1187 if (ctxt->attsSpecial == NULL)
1188 goto mem_error;
1189 }
1190
1191 if (xmlHashAdd2(ctxt->attsSpecial, fullname, fullattr,
1192 (void *) (ptrdiff_t) type) < 0)
1193 goto mem_error;
1194 return;
1195
1196mem_error:
1197 xmlErrMemory(ctxt);
1198 return;
1199}
1200
1201/**
1202 * xmlCleanSpecialAttrCallback:

Callers 1

Calls 3

xmlHashCreateDictFunction · 0.85
xmlHashAdd2Function · 0.85
xmlErrMemoryFunction · 0.85

Tested by

no test coverage detected