Added wrapper for the xmlURIPtr type, provided accessors, fixed the
* python/generator.py python/libxml.c python/libxml2-python-api.xml
python/libxml2class.txt python/libxml_wrap.h python/types.c:
Added wrapper for the xmlURIPtr type, provided accessors, fixed
the accessor generator for strings
* python/tests/Makefile.am python/tests/tstURI.py: added a specific
regression test.
Daniel
diff --git a/python/libxml_wrap.h b/python/libxml_wrap.h
index 77c0736..1877deb 100644
--- a/python/libxml_wrap.h
+++ b/python/libxml_wrap.h
@@ -55,9 +55,19 @@
xmlCatalogPtr obj;
} Pycatalog_Object;
+#define PyURI_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyURI_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlURIPtr obj;
+} PyURI_Object;
+
+/* FILE * have their own internal representation */
#define PyFile_Get(v) (((v) == Py_None) ? NULL : \
(PyFile_Check(v) ? NULL : (PyFile_AsFile(v))))
+
PyObject * libxml_intWrap(int val);
PyObject * libxml_longWrap(long val);
PyObject * libxml_xmlCharPtrWrap(xmlChar *str);
@@ -78,5 +88,6 @@
PyObject * libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt);
PyObject * libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj);
PyObject * libxml_xmlCatalogPtrWrap(xmlCatalogPtr obj);
+PyObject * libxml_xmlURIPtrWrap(xmlURIPtr uri);
xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);