diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2002-02-07 17:02:34 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2002-02-07 17:02:34 +0000 |
commit | 9de2bd46fce5d8e9ba9185dbb6044570887603cc (patch) | |
tree | 81c1ebc2197735ea8705b0ed735e1295f2dd95bf /python/generator.py | |
parent | ff22c1a5f95bccd0b400d251dfde04280a6c7d52 (diff) | |
download | libxslt-9de2bd46fce5d8e9ba9185dbb6044570887603cc.tar.gz libxslt-9de2bd46fce5d8e9ba9185dbb6044570887603cc.tar.bz2 libxslt-9de2bd46fce5d8e9ba9185dbb6044570887603cc.zip |
small fix cleanup avoid a problem with $(TESTS) augmented the wrappers
* xsltproc/xsltproc.c: small fix
* Makefile.am: cleanup
* python/tests/Makefile.am: avoid a problem with $(TESTS)
* python/generator.py python/libxml_wrap.h python/libxsl.py
python/libxslt.c python/libxsltclass.txt: augmented the
wrappers
* python/tests/pyxsltproc.py: rewrote xsltproc on top of the
libxslt-python API to get an estimate of what is missing
Daniel
Diffstat (limited to 'python/generator.py')
-rwxr-xr-x | python/generator.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/python/generator.py b/python/generator.py index bf69805c..41c83bde 100755 --- a/python/generator.py +++ b/python/generator.py @@ -258,15 +258,18 @@ py_types = { 'htmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr", "libxml_"), 'const htmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr", "libxml_"), 'xmlXPathContextPtr': ('O', "xmlXPathContext", "xmlXPathContextPtr", "xmlXPathContextPtr", "libxml_"), - 'xmlXPathContext *': ('O', "xpathContext", "xmlXPathContextPtr", "xmlXPathContextPtr", "libxml_"), + 'xmlXPathParserContextPtr': ('O', "xmlXPathParserContext", "xmlXPathParserContextPtr", "xmlXPathParserContextPtr", "libxml_"), 'xmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr", "libxml_"), 'xmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr", "libxml_"), 'htmlParserCtxtPtr': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr", "libxml_"), 'htmlParserCtxt *': ('O', "parserCtxt", "xmlParserCtxtPtr", "xmlParserCtxtPtr", "libxml_"), + 'xmlCatalogPtr': ('O', "catalog", "xmlCatalogPtr", "xmlCatalogPtr"), + 'FILE *': ('O', "File", "FILEPtr", "FILE *", "libxml_"), 'xsltTransformContextPtr': ('O', "transformCtxt", "xsltTransformContextPtr", "xsltTransformContextPtr", "libxslt_"), 'xsltTransformContext *': ('O', "transformCtxt", "xsltTransformContextPtr", "xsltTransformContextPtr", "libxslt_"), 'xsltStylesheetPtr': ('O', "stylesheet", "xsltStylesheetPtr", "xsltStylesheetPtr", "libxslt_"), 'xsltStylesheet *': ('O', "stylesheet", "xsltStylesheetPtr", "xsltStylesheetPtr", "libxslt_"), + 'xmlXPathContext *': ('O', "xpathContext", "xmlXPathContextPtr", "xmlXPathContextPtr", "libxslt_"), } py_return_types = { @@ -461,7 +464,10 @@ wrapper.close() print "Generated %d wrapper functions, %d failed, %d skipped\n" % (nb_wrap, failed, skipped); -print "Missing type converters: %s" % (unknown_types.keys()) +print "Missing type converters:" +for type in unknown_types.keys(): + print "%s:%d " % (type, len(unknown_types[type])), +print ####################################################################### # @@ -493,9 +499,9 @@ libxml2_classes_type = { "xmlElement *": ("._o", "xmlElement(_obj=%s)", "xmlElement"), "xmlAttributePtr": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"), "xmlAttribute *": ("._o", "xmlAttribute(_obj=%s)", "xmlAttribute"), - "xmlXPathContextPtr": ("._o", "xpathContext(_obj=%s)", "xpathContext"), "xmlParserCtxtPtr": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"), "xmlParserCtxt *": ("._o", "parserCtxt(_obj=%s)", "parserCtxt"), + "xmlCatalogPtr": ("._o", "catalog(_obj=%s)", "catalog"), } classes_type = { @@ -503,15 +509,21 @@ classes_type = { "xsltTransformContext *": ("._o", "transformCtxt(_obj=%s)", "transformCtxt"), "xsltStylesheetPtr": ("._o", "stylesheet(_obj=%s)", "stylesheet"), "xsltStylesheet *": ("._o", "stylesheet(_obj=%s)", "stylesheet"), + "xmlXPathContextPtr": ("._o", "xpathContext(_obj=%s)", "xpathContext"), + "xmlXPathContext *": ("._o", "xpathContext(_obj=%s)", "xpathContext"), + "xmlXPathParserContextPtr": ("._o", "xpathParserContext(_obj=%s)", "xpathParserContext"), + "xmlXPathParserContext *": ("._o", "xpathParserContext(_obj=%s)", "xpathParserContext"), } converter_type = { "xmlXPathObjectPtr": "xpathObjectRet(%s)", } -primary_classes = ["transformCtxt", "stylesheet"] +primary_classes = ["xpathParserContext", "xpathContext", "transformCtxt", "stylesheet"] classes_ancestor = { + "xpathContext" : "libxml2.xpathContext", + "xpathParserContext" : "libxml2.xpathParserContext", } classes_destructors = { "stylesheet": "xsltFreeStylesheet", @@ -737,7 +749,7 @@ if function_classes.has_key("None"): classes.write("\n"); elif libxml2_classes_type.has_key(ret[0]): classes.write(" if ret == None: return None\n"); - classes.write(" return "); + classes.write(" return libxml2."); classes.write(libxml2_classes_type[ret[0]][1] % ("ret")); classes.write("\n"); else: @@ -847,7 +859,7 @@ for classname in classes_list: classes.write("\n"); elif libxml2_classes_type.has_key(ret[0]): classes.write(" if ret == None: return None\n"); - classes.write(" return "); + classes.write(" return libxml2."); classes.write(libxml2_classes_type[ret[0]][1] % ("ret")); classes.write("\n"); elif converter_type.has_key(ret[0]): |