mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:55:41 +00:00
[LIBXML2] Update to version 2.10.3. CORE-17766
This commit is contained in:
parent
19da1718e5
commit
c0027d117c
7 changed files with 172 additions and 169 deletions
55
sdk/lib/3rdparty/libxml2/entities.c
vendored
55
sdk/lib/3rdparty/libxml2/entities.c
vendored
|
@ -128,36 +128,19 @@ xmlFreeEntity(xmlEntityPtr entity)
|
|||
if ((entity->children) && (entity->owner == 1) &&
|
||||
(entity == (xmlEntityPtr) entity->children->parent))
|
||||
xmlFreeNodeList(entity->children);
|
||||
if (dict != NULL) {
|
||||
if ((entity->name != NULL) && (!xmlDictOwns(dict, entity->name)))
|
||||
xmlFree((char *) entity->name);
|
||||
if ((entity->ExternalID != NULL) &&
|
||||
(!xmlDictOwns(dict, entity->ExternalID)))
|
||||
xmlFree((char *) entity->ExternalID);
|
||||
if ((entity->SystemID != NULL) &&
|
||||
(!xmlDictOwns(dict, entity->SystemID)))
|
||||
xmlFree((char *) entity->SystemID);
|
||||
if ((entity->URI != NULL) && (!xmlDictOwns(dict, entity->URI)))
|
||||
xmlFree((char *) entity->URI);
|
||||
if ((entity->content != NULL)
|
||||
&& (!xmlDictOwns(dict, entity->content)))
|
||||
xmlFree((char *) entity->content);
|
||||
if ((entity->orig != NULL) && (!xmlDictOwns(dict, entity->orig)))
|
||||
xmlFree((char *) entity->orig);
|
||||
} else {
|
||||
if (entity->name != NULL)
|
||||
xmlFree((char *) entity->name);
|
||||
if (entity->ExternalID != NULL)
|
||||
xmlFree((char *) entity->ExternalID);
|
||||
if (entity->SystemID != NULL)
|
||||
xmlFree((char *) entity->SystemID);
|
||||
if (entity->URI != NULL)
|
||||
xmlFree((char *) entity->URI);
|
||||
if (entity->content != NULL)
|
||||
xmlFree((char *) entity->content);
|
||||
if (entity->orig != NULL)
|
||||
xmlFree((char *) entity->orig);
|
||||
}
|
||||
if ((entity->name != NULL) &&
|
||||
((dict == NULL) || (!xmlDictOwns(dict, entity->name))))
|
||||
xmlFree((char *) entity->name);
|
||||
if (entity->ExternalID != NULL)
|
||||
xmlFree((char *) entity->ExternalID);
|
||||
if (entity->SystemID != NULL)
|
||||
xmlFree((char *) entity->SystemID);
|
||||
if (entity->URI != NULL)
|
||||
xmlFree((char *) entity->URI);
|
||||
if (entity->content != NULL)
|
||||
xmlFree((char *) entity->content);
|
||||
if (entity->orig != NULL)
|
||||
xmlFree((char *) entity->orig);
|
||||
xmlFree(entity);
|
||||
}
|
||||
|
||||
|
@ -193,18 +176,12 @@ xmlCreateEntity(xmlDictPtr dict, const xmlChar *name, int type,
|
|||
ret->SystemID = xmlStrdup(SystemID);
|
||||
} else {
|
||||
ret->name = xmlDictLookup(dict, name, -1);
|
||||
if (ExternalID != NULL)
|
||||
ret->ExternalID = xmlDictLookup(dict, ExternalID, -1);
|
||||
if (SystemID != NULL)
|
||||
ret->SystemID = xmlDictLookup(dict, SystemID, -1);
|
||||
ret->ExternalID = xmlStrdup(ExternalID);
|
||||
ret->SystemID = xmlStrdup(SystemID);
|
||||
}
|
||||
if (content != NULL) {
|
||||
ret->length = xmlStrlen(content);
|
||||
if ((dict != NULL) && (ret->length < 5))
|
||||
ret->content = (xmlChar *)
|
||||
xmlDictLookup(dict, content, ret->length);
|
||||
else
|
||||
ret->content = xmlStrndup(content, ret->length);
|
||||
ret->content = xmlStrndup(content, ret->length);
|
||||
} else {
|
||||
ret->length = 0;
|
||||
ret->content = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue