Commit d5cc0f7f authored by Daniel Veillard's avatar Daniel Veillard

augmented types supported a number of new bug fixes and documentation

* gentest.py testapi.c: augmented types supported
* HTMLtree.c tree.c xmlreader.c xmlwriter.c: a number of new
  bug fixes and documentation updates.
Daniel
parent 57b2516a
Sat Nov 6 20:24:07 CET 2004 Daniel Veillard <daniel@veillard.com>
* gentest.py testapi.c: augmented types supported
* HTMLtree.c tree.c xmlreader.c xmlwriter.c: a number of new
bug fixes and documentation updates.
Sat Nov 6 15:50:11 CET 2004 Daniel Veillard <daniel@veillard.com>
* gentest.py testapi.c: augmented type autogeneration for enums
......
......@@ -522,6 +522,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
xmlInitParser();
if ((mem == NULL) || (size == NULL))
return;
if (cur == NULL) {
*mem = NULL;
*size = 0;
......
......@@ -40,7 +40,7 @@ skipped_functions = [
"xmlCleanupParser", "xmlRelaxNGCleanupTypes", "xmlSetListDoc",
"xmlSetTreeDoc", "xmlUnlinkNode",
# hard to avoid leaks in the tests
"xmlStrcat", "xmlStrncat", "xmlCatalogAddLocal",
"xmlStrcat", "xmlStrncat", "xmlCatalogAddLocal", "xmlNewTextWriterDoc",
# unimplemented
"xmlTextReaderReadInnerXml", "xmlTextReaderReadOuterXml",
"xmlTextReaderReadString",
......@@ -48,6 +48,7 @@ skipped_functions = [
"xmlListDelete", "xmlOutputBufferClose", "xmlNanoFTPClose",
# deprecated
"xmlCatalogGetPublic", "xmlCatalogGetSystem", "xmlEncodeEntities",
"xmlNewGlobalNs",
# allocators
"xmlMemFree",
]
......@@ -76,6 +77,8 @@ extra_pre_call = {
"if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;",
"xmlParseBalancedChunkMemoryRecover":
"if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;",
"xmlParserInputBufferCreateFd":
"if (fd >= 0) fd = -1;",
}
extra_post_call = {
"xmlAddChild":
......@@ -116,6 +119,11 @@ extra_post_call = {
"xmlSaveFormatFileTo": """buf = NULL;""",
"xmlIOParseDTD": "input = NULL;",
"xmlRemoveProp": "cur = NULL;",
"xmlNewNs": "if ((node == NULL) && (ret_val != NULL)) xmlFreeNs(ret_val);",
"xmlCopyNamespace": "if (ret_val != NULL) xmlFreeNs(ret_val);",
"xmlCopyNamespaceList": "if (ret_val != NULL) xmlFreeNsList(ret_val);",
"xmlNewTextWriter": "if (ret_val != NULL) out = NULL;",
"xmlNewTextWriterPushParser": "if (ret_val != NULL) ctxt = NULL;",
}
modules = []
......@@ -174,7 +182,11 @@ def add_missing_functions(name, module):
#
def type_convert(str, name, info, module, function, pos):
# res = string.replace(str, " ", " ")
# res = string.replace(str, " ", " ")
# res = string.replace(str, " ", " ")
res = string.replace(str, " *", "_ptr")
# res = string.replace(str, "*", "_ptr")
res = string.replace(res, " ", "_")
res = string.replace(res, "htmlNode", "xmlNode")
res = string.replace(res, "htmlDoc", "xmlDoc")
......@@ -223,6 +235,16 @@ def type_convert(str, name, info, module, function, pos):
if res == 'xmlChar_ptr' and name == 'name' and \
string.find(function, "EatName") != -1:
return('eaten_name')
if res == 'void_ptr*':
res = 'void_ptr_ptr'
if res == 'char_ptr*':
res = 'char_ptr_ptr'
if res == 'xmlChar_ptr*':
res = 'xmlChar_ptr_ptr'
if res == 'const_xmlChar_ptr*':
res = 'const_xmlChar_ptr_ptr'
if res == 'const_char_ptr*':
res = 'const_char_ptr_ptr'
return res
......
This diff is collapsed.
......@@ -242,6 +242,7 @@ xmlSplitQName2(const xmlChar *name, xmlChar **prefix) {
int len = 0;
xmlChar *ret = NULL;
if (prefix == NULL) return(NULL);
*prefix = NULL;
if (name == NULL) return(NULL);
......
......@@ -4213,8 +4213,8 @@ void
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc *f,
void **arg) {
*f = reader->errorFunc;
*arg = reader->errorFuncArg;
if (f != NULL) *f = reader->errorFunc;
if (arg != NULL) *arg = reader->errorFuncArg;
}
......
......@@ -145,6 +145,8 @@ xmlWriterErrMsgInt(xmlTextWriterPtr ctxt, xmlParserErrors error,
* @out: an xmlOutputBufferPtr
*
* Create a new xmlNewTextWriter structure using an xmlOutputBufferPtr
* NOTE: the @out parameter will be deallocated when the writer is closed
* (if the call succeed.)
*
* Returns the new xmlTextWriterPtr or NULL in case of error
*/
......@@ -280,6 +282,8 @@ xmlNewTextWriterMemory(xmlBufferPtr buf, int compression ATTRIBUTE_UNUSED)
* @compression: compress the output?
*
* Create a new xmlNewTextWriter structure with @ctxt as output
* NOTE: the @ctxt context will be freed with the resulting writer
* (if the call succeeds).
* TODO: handle compression
*
* Returns the new xmlTextWriterPtr or NULL in case of error
......
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