* xmlAddSpecialAttr: * @ctxt: an XML parser context * @fullname: the element fullname * @fullattr: the attribute fullname * @type: the attribute type * * Register this attribute type */
| 1177 | * Register this attribute type |
| 1178 | */ |
| 1179 | static void |
| 1180 | xmlAddSpecialAttr(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 | |
| 1196 | mem_error: |
| 1197 | xmlErrMemory(ctxt); |
| 1198 | return; |
| 1199 | } |
| 1200 | |
| 1201 | /** |
| 1202 | * xmlCleanSpecialAttrCallback: |
no test coverage detected