1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

fix a problem with previous patch to testapi.c Daniel

* gentest.py testapi.c: fix a problem with previous patch to
  testapi.c
Daniel
This commit is contained in:
Daniel Veillard
2005-07-03 22:40:26 +00:00
parent 7e21fd108c
commit 7e33dbaa0e
3 changed files with 7 additions and 4 deletions

View File

@@ -519,10 +519,6 @@ static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {
}
static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {
if (no == 1) {
if ((val != NULL) && (val->parent == NULL)) {
xmlUnlinkNode(val);
xmlFreeNode(val);
}
free_api_doc();
} else if (val != NULL) {
xmlUnlinkNode(val);
@@ -18933,6 +18929,7 @@ test_xmlDOMWrapAdoptNode(void) {
options = gen_int(n_options, 5);
ret_val = xmlDOMWrapAdoptNode(ctxt, sourceDoc, node, destDoc, destParent, options);
if ((node != NULL) && (node->parent == NULL)) {xmlUnlinkNode(node);xmlFreeNode(node);node = NULL;}
desret_int(ret_val);
call_tests++;
des_xmlDOMWrapCtxtPtr(n_ctxt, ctxt, 0);