diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2004-11-02 18:45:30 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2004-11-02 18:45:30 +0000 |
commit | a03e36566be477c034d30ba78c2524c55c41bc71 (patch) | |
tree | f2eb5530b2d98bf1ebd1a93860c30aca13f717b5 /tree.c | |
parent | d93f625ae90cafbd91b55b04408854a9b4b75192 (diff) | |
download | android_external_libxml2-a03e36566be477c034d30ba78c2524c55c41bc71.tar.gz android_external_libxml2-a03e36566be477c034d30ba78c2524c55c41bc71.tar.bz2 android_external_libxml2-a03e36566be477c034d30ba78c2524c55c41bc71.zip |
more developments on the API testing more cleanups rebuilt Daniel
* gentest.py testapi.c: more developments on the API testing
* HTMLparser.c tree.c: more cleanups
* doc/*: rebuilt
Daniel
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -2154,6 +2154,7 @@ xmlNewDocPI(xmlDocPtr doc, const xmlChar *name, const xmlChar *content) { if (content != NULL) { cur->content = xmlStrdup(content); } + cur->doc = doc; if ((__xmlRegisterCallbacks) && (xmlRegisterNodeDefaultValue)) xmlRegisterNodeDefaultValue((xmlNodePtr)cur); @@ -3525,10 +3526,10 @@ xmlUnlinkNode(xmlNodePtr cur) { */ xmlNodePtr xmlReplaceNode(xmlNodePtr old, xmlNodePtr cur) { - if (old == NULL) { + if ((old == NULL) || (old->parent == NULL)) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, - "xmlReplaceNode : old == NULL\n"); + "xmlReplaceNode : old == NULL or without parent\n"); #endif return(NULL); } |