mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
more fixes about unregistering objects applied patch from Mark Vakoc
* xpath.c: more fixes about unregistering objects * include/libxml/relaxng.h: applied patch from Mark Vakoc missing _cplusplus processing clause Daniel
This commit is contained in:
parent
b5a46da41d
commit
94394cd1e4
@ -1,3 +1,9 @@
|
||||
Wed Oct 29 18:05:53 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* xpath.c: more fixes about unregistering objects
|
||||
* include/libxml/relaxng.h: applied patch from Mark Vakoc
|
||||
missing _cplusplus processing clause
|
||||
|
||||
Wed Oct 29 07:49:52 2003 Aleksey Sanin <aleksey@aleksey.com>
|
||||
|
||||
* include/libxml/parser.h parser.c: added xmlStrVPrintf function
|
||||
|
@ -12,6 +12,10 @@
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/hash.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _xmlRelaxNG xmlRelaxNG;
|
||||
typedef xmlRelaxNG *xmlRelaxNGPtr;
|
||||
|
||||
@ -152,4 +156,8 @@ XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_RELAX_NG__ */
|
||||
|
7
xpath.c
7
xpath.c
@ -2709,6 +2709,8 @@ xmlXPathRegisterFuncNS(xmlXPathContextPtr ctxt, const xmlChar *name,
|
||||
ctxt->funcHash = xmlHashCreate(0);
|
||||
if (ctxt->funcHash == NULL)
|
||||
return(-1);
|
||||
if (f == NULL)
|
||||
return(xmlHashRemoveEntry2(ctxt->funcHash, name, ns_uri, NULL));
|
||||
return(xmlHashAddEntry2(ctxt->funcHash, name, ns_uri, (void *) f));
|
||||
}
|
||||
|
||||
@ -2855,6 +2857,9 @@ xmlXPathRegisterVariableNS(xmlXPathContextPtr ctxt, const xmlChar *name,
|
||||
ctxt->varHash = xmlHashCreate(0);
|
||||
if (ctxt->varHash == NULL)
|
||||
return(-1);
|
||||
if (value == NULL)
|
||||
return(xmlHashRemoveEntry2(ctxt->varHash, name, ns_uri,
|
||||
(xmlHashDeallocator)xmlXPathFreeObject));
|
||||
return(xmlHashUpdateEntry2(ctxt->varHash, name, ns_uri,
|
||||
(void *) value,
|
||||
(xmlHashDeallocator)xmlXPathFreeObject));
|
||||
@ -2975,7 +2980,7 @@ xmlXPathRegisterNs(xmlXPathContextPtr ctxt, const xmlChar *prefix,
|
||||
if (ctxt->nsHash == NULL)
|
||||
return(-1);
|
||||
if (ns_uri == NULL)
|
||||
return(xmlHashRemoveEntry(ctxt->nsHash, ns_uri,
|
||||
return(xmlHashRemoveEntry(ctxt->nsHash, prefix,
|
||||
(xmlHashDeallocator)xmlFree));
|
||||
return(xmlHashUpdateEntry(ctxt->nsHash, prefix, (void *) xmlStrdup(ns_uri),
|
||||
(xmlHashDeallocator)xmlFree));
|
||||
|
Loading…
x
Reference in New Issue
Block a user