1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

- hash.[ch]: added a first version of xmlHashSize()

- valid.c: another bug fix from Gary Pennington
Daniel
This commit is contained in:
Daniel Veillard
2001-02-08 09:37:42 +00:00
parent 5eef6225f7
commit 1f83d39fd3
5 changed files with 31 additions and 2 deletions

View File

@ -1775,8 +1775,12 @@ xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
* !!! Should we keep track of all refs ? and use xmlHashAddEntry2 ?
*/
if (xmlHashAddEntry(table, value, ret) < 0) {
xmlFreeRef(ret);
return(NULL);
/*
* Since there is no discrimination on error returns
* from xmlHashAddEntry, I'm presuming <0 means the
* key already exists.
*/
xmlHashUpdateEntry(table, value, ret, (xmlHashDeallocator) xmlFreeRef);
}
return(ret);
}