mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-10 08:58:16 +03:00
- xmlversion.h.in libxml.h: Cygwin patches
- tree.c: xmlFreeNodeList patch similar to xmlFreeNode one - tree.h: cleanup Daniel
This commit is contained in:
parent
acd370fb1a
commit
9cc6dc62f7
@ -1,3 +1,9 @@
|
|||||||
|
Mon Jun 11 10:07:29 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* xmlversion.h.in libxml.h: Cygwin patches
|
||||||
|
* tree.c: xmlFreeNodeList patch similar to xmlFreeNode one
|
||||||
|
* tree.h: cleanup
|
||||||
|
|
||||||
Sat Jun 9 19:16:00 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Sat Jun 9 19:16:00 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* tree.c: patched xmlFreeNode() to avoid freeing() a static
|
* tree.c: patched xmlFreeNode() to avoid freeing() a static
|
||||||
|
@ -69,16 +69,6 @@ typedef enum {
|
|||||||
|
|
||||||
typedef unsigned char xmlChar;
|
typedef unsigned char xmlChar;
|
||||||
|
|
||||||
/*
|
|
||||||
* Removed in 2.3.9 ... nobody should still use this
|
|
||||||
*
|
|
||||||
#ifndef WIN32
|
|
||||||
#ifndef CHAR
|
|
||||||
#define CHAR xmlChar
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BAD_CAST:
|
* BAD_CAST:
|
||||||
*
|
*
|
||||||
|
@ -129,7 +129,7 @@ extern void xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether iconv support is available
|
* Whether iconv support is available
|
||||||
*/
|
*/
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||||
#if @WITH_ICONV@
|
#if @WITH_ICONV@
|
||||||
#define LIBXML_ICONV_ENABLED
|
#define LIBXML_ICONV_ENABLED
|
||||||
#else
|
#else
|
||||||
|
2
libxml.h
2
libxml.h
@ -9,7 +9,7 @@
|
|||||||
#ifndef __XML_LIBXML_H__
|
#ifndef __XML_LIBXML_H__
|
||||||
#define __XML_LIBXML_H__
|
#define __XML_LIBXML_H__
|
||||||
|
|
||||||
#ifdef WIN32
|
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||||
#include "win32config.h"
|
#include "win32config.h"
|
||||||
#else
|
#else
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
23
tree.c
23
tree.c
@ -2369,11 +2369,30 @@ xmlFreeNodeList(xmlNodePtr cur) {
|
|||||||
#else
|
#else
|
||||||
if (cur->content != NULL) xmlBufferFree(cur->content);
|
if (cur->content != NULL) xmlBufferFree(cur->content);
|
||||||
#endif
|
#endif
|
||||||
|
/*
|
||||||
|
* When a node is a text node or a comment, it uses a global static
|
||||||
|
* variable for the name of the node.
|
||||||
|
*
|
||||||
|
* The xmlStrEqual comparisons need to be done when (happened with
|
||||||
|
* XML::libXML and XML::libXSLT) the library is included twice
|
||||||
|
* statically in the binary and a tree allocated by one occurent
|
||||||
|
* of the lib gets freed by the other occurence, in this case
|
||||||
|
* the string addresses compare are not sufficient.
|
||||||
|
*/
|
||||||
if ((cur->name != NULL) &&
|
if ((cur->name != NULL) &&
|
||||||
(cur->name != xmlStringText) &&
|
(cur->name != xmlStringText) &&
|
||||||
(cur->name != xmlStringTextNoenc) &&
|
(cur->name != xmlStringTextNoenc) &&
|
||||||
(cur->name != xmlStringComment))
|
(cur->name != xmlStringComment)) {
|
||||||
xmlFree((char *) cur->name);
|
if (cur->type == XML_TEXT_NODE) {
|
||||||
|
if ((!xmlStrEqual(cur->name, xmlStringText)) &&
|
||||||
|
(!xmlStrEqual(cur->name, xmlStringTextNoenc)))
|
||||||
|
xmlFree((char *) cur->name);
|
||||||
|
} else if (cur->type == XML_COMMENT_NODE) {
|
||||||
|
if (!xmlStrEqual(cur->name, xmlStringComment))
|
||||||
|
xmlFree((char *) cur->name);
|
||||||
|
} else
|
||||||
|
xmlFree((char *) cur->name);
|
||||||
|
}
|
||||||
/* TODO : derecursivate this function */
|
/* TODO : derecursivate this function */
|
||||||
if (cur->nsDef != NULL) xmlFreeNsList(cur->nsDef);
|
if (cur->nsDef != NULL) xmlFreeNsList(cur->nsDef);
|
||||||
xmlFree(cur);
|
xmlFree(cur);
|
||||||
|
10
tree.h
10
tree.h
@ -69,16 +69,6 @@ typedef enum {
|
|||||||
|
|
||||||
typedef unsigned char xmlChar;
|
typedef unsigned char xmlChar;
|
||||||
|
|
||||||
/*
|
|
||||||
* Removed in 2.3.9 ... nobody should still use this
|
|
||||||
*
|
|
||||||
#ifndef WIN32
|
|
||||||
#ifndef CHAR
|
|
||||||
#define CHAR xmlChar
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BAD_CAST:
|
* BAD_CAST:
|
||||||
*
|
*
|
||||||
|
@ -129,7 +129,7 @@ extern void xmlCheckVersion(int version);
|
|||||||
*
|
*
|
||||||
* Whether iconv support is available
|
* Whether iconv support is available
|
||||||
*/
|
*/
|
||||||
#ifndef WIN32
|
#if !defined(WIN32) || defined(__CYGWIN__)
|
||||||
#if @WITH_ICONV@
|
#if @WITH_ICONV@
|
||||||
#define LIBXML_ICONV_ENABLED
|
#define LIBXML_ICONV_ENABLED
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user