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

cleanup of global variables, marking some const or private. Daniel

* include/libxml/parserInternals.h include/libxml/HTMLparser.h
  xmlIO.c tree.c parserInternals.c entities.c encoding.c
  HTMLparser.c: cleanup of global variables, marking some
  const or private.
Daniel
This commit is contained in:
Daniel Veillard
2001-07-16 00:06:07 +00:00
parent 496be68388
commit 220907319a
9 changed files with 52 additions and 49 deletions

View File

@ -26,7 +26,7 @@ struct xmlPredefinedEntityValue {
const char *name;
const char *value;
};
struct xmlPredefinedEntityValue xmlPredefinedEntityValues[] = {
static struct xmlPredefinedEntityValue xmlPredefinedEntityValues[] = {
{ "lt", "<" },
{ "gt", ">" },
{ "apos", "'" },
@ -46,7 +46,8 @@ xmlHashTablePtr xmlPredefinedEntities = NULL;
static void xmlFreeEntity(xmlEntityPtr entity) {
if (entity == NULL) return;
if ((entity->children) && (entity->children->parent == entity))
if ((entity->children) &&
(entity == (xmlEntityPtr) entity->children->parent))
xmlFreeNodeList(entity->children);
if (entity->name != NULL)
xmlFree((char *) entity->name);