1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

Added hooks for servants, Daniel.

This commit is contained in:
Daniel Veillard
1998-10-08 03:47:24 +00:00
parent 8631b78f5b
commit 278647065b
4 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Wed Oct 7 23:42:46 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* added hooks to keep track of servants when creating objects
xmlDoc and xmlNode (for Corba export).
Sun Oct 4 03:18:09 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org> Sun Oct 4 03:18:09 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* added xml-config script. * added xml-config script.

View File

@ -94,15 +94,16 @@ typedef struct xmlAttr {
#define XML_TYPE_ENTITY 3 #define XML_TYPE_ENTITY 3
typedef struct xmlNode { typedef struct xmlNode {
int type; /* type number in the DTD */
struct xmlNode *parent; /* child->parent link */ struct xmlNode *parent; /* child->parent link */
struct xmlNode *next; /* next sibling link */ struct xmlNode *next; /* next sibling link */
struct xmlNode *childs; /* parent->childs link */ struct xmlNode *childs; /* parent->childs link */
struct xmlAttr *properties; /* properties list */ struct xmlAttr *properties; /* properties list */
int type; /* type number in the DTD */
const CHAR *name; /* the name of the node, or the entity */ const CHAR *name; /* the name of the node, or the entity */
xmlNs *ns; /* pointer to the associated namespace */ xmlNs *ns; /* pointer to the associated namespace */
xmlNs *nsDef; /* namespace definitions on this node */ xmlNs *nsDef; /* namespace definitions on this node */
CHAR *content; /* the content */ CHAR *content; /* the content */
void *servant; /* for Corba ! */
} xmlNode, *xmlNodePtr; } xmlNode, *xmlNodePtr;
/* /*
@ -118,6 +119,7 @@ typedef struct xmlDoc {
struct xmlNs *oldNs; /* Global namespace, the old way */ struct xmlNs *oldNs; /* Global namespace, the old way */
void *entities; /* Hash table for general entities if any */ void *entities; /* Hash table for general entities if any */
struct xmlNode *root; /* the document tree */ struct xmlNode *root; /* the document tree */
void *servant; /* for Corba ! */
} xmlDoc, *xmlDocPtr; } xmlDoc, *xmlDocPtr;
/* /*

2
tree.c
View File

@ -277,6 +277,7 @@ xmlDocPtr xmlNewDoc(const CHAR *version) {
cur->entities = NULL; cur->entities = NULL;
cur->standalone = -1; cur->standalone = -1;
cur->compression = xmlCompressMode; cur->compression = xmlCompressMode;
cur->servant = NULL;
return(cur); return(cur);
} }
@ -404,6 +405,7 @@ xmlNodePtr xmlNewNode(xmlNsPtr ns, const CHAR *name, CHAR *content) {
cur->name = xmlStrdup(name); cur->name = xmlStrdup(name);
cur->ns = ns; cur->ns = ns;
cur->nsDef = NULL; cur->nsDef = NULL;
cur->servant = NULL;
if (content != NULL) if (content != NULL)
cur->content = xmlStrdup(content); cur->content = xmlStrdup(content);
else else

4
tree.h
View File

@ -94,15 +94,16 @@ typedef struct xmlAttr {
#define XML_TYPE_ENTITY 3 #define XML_TYPE_ENTITY 3
typedef struct xmlNode { typedef struct xmlNode {
int type; /* type number in the DTD */
struct xmlNode *parent; /* child->parent link */ struct xmlNode *parent; /* child->parent link */
struct xmlNode *next; /* next sibling link */ struct xmlNode *next; /* next sibling link */
struct xmlNode *childs; /* parent->childs link */ struct xmlNode *childs; /* parent->childs link */
struct xmlAttr *properties; /* properties list */ struct xmlAttr *properties; /* properties list */
int type; /* type number in the DTD */
const CHAR *name; /* the name of the node, or the entity */ const CHAR *name; /* the name of the node, or the entity */
xmlNs *ns; /* pointer to the associated namespace */ xmlNs *ns; /* pointer to the associated namespace */
xmlNs *nsDef; /* namespace definitions on this node */ xmlNs *nsDef; /* namespace definitions on this node */
CHAR *content; /* the content */ CHAR *content; /* the content */
void *servant; /* for Corba ! */
} xmlNode, *xmlNodePtr; } xmlNode, *xmlNodePtr;
/* /*
@ -118,6 +119,7 @@ typedef struct xmlDoc {
struct xmlNs *oldNs; /* Global namespace, the old way */ struct xmlNs *oldNs; /* Global namespace, the old way */
void *entities; /* Hash table for general entities if any */ void *entities; /* Hash table for general entities if any */
struct xmlNode *root; /* the document tree */ struct xmlNode *root; /* the document tree */
void *servant; /* for Corba ! */
} xmlDoc, *xmlDocPtr; } xmlDoc, *xmlDocPtr;
/* /*