Commit c394f734 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

had to fix generation and rebuild. the testapi found a bug in the last

* gentest.py testapi.c: had to fix generation and rebuild.
* valid.c: the testapi found a bug in the last code of course !
Daniel
parent 2ae13382
Wed Jan 26 01:03:37 CET 2005 Daniel Veillard <daniel@veillard.com>
* gentest.py testapi.c: had to fix generation and rebuild.
* valid.c: the testapi found a bug in the last code of course !
Wed Jan 26 00:43:05 CET 2005 Daniel Veillard <daniel@veillard.com>
 
* Makefile.am testapi.c doc/Makefile.am: fixing the way testapi.c
......
......@@ -231,6 +231,8 @@ extra_post_call = {
(ret_val != prefix) && (ret_val != memory))
xmlFree(ret_val);
ret_val = NULL;""",
"xmlNewDocElementContent":
"""xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;""",
"xmlDictReference": "xmlDictFree(dict);",
# Functions which deallocates one of their parameters
"xmlXPathConvertBoolean": """val = NULL;""",
......
......@@ -24401,6 +24401,7 @@ test_xmlNewDocElementContent(void) {
type = gen_xmlElementContentType(n_type, 2);
 
ret_val = xmlNewDocElementContent(doc, (const xmlChar *)name, type);
xmlFreeDocElementContent(doc, ret_val); ret_val = NULL;
desret_xmlElementContentPtr(ret_val);
call_tests++;
des_xmlDocPtr(n_doc, doc, 0);
......@@ -1547,8 +1547,9 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
* and flag it by setting a special parent value
* so the parser doesn't unallocate it.
*/
if ((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
(ctxt->finishDtd == XML_CTXT_FINISH_DTD_1)) {
if ((ctxt != NULL) &&
((ctxt->finishDtd == XML_CTXT_FINISH_DTD_0) ||
(ctxt->finishDtd == XML_CTXT_FINISH_DTD_1))) {
ret->content = content;
if (content != NULL)
content->parent = (xmlElementContentPtr) 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment