patch from Stéphane Bidoul for better per context error message APIs
* xmlreader.c python/drv_libxml2.py python/generator.py
python/libxml.c python/libxml.py python/libxml_wrap.h
python/types.c: patch from Stéphane Bidoul for better per
context error message APIs
* python/tests/ctxterror.py python/tests/readererr.py:
update of the tests
Daniel
diff --git a/python/libxml_wrap.h b/python/libxml_wrap.h
index c8730ca..c59b706 100644
--- a/python/libxml_wrap.h
+++ b/python/libxml_wrap.h
@@ -93,6 +93,14 @@
xmlTextReaderPtr obj;
} PyxmlTextReader_Object;
+#define PyxmlTextReaderLocator_Get(v) (((v) == Py_None) ? NULL : \
+ (((PyxmlTextReaderLocator_Object *)(v))->obj))
+
+typedef struct {
+ PyObject_HEAD
+ xmlTextReaderLocatorPtr obj;
+} PyxmlTextReaderLocator_Object;
+
#define PyURI_Get(v) (((v) == Py_None) ? NULL : \
(((PyURI_Object *)(v))->obj))
@@ -147,19 +155,6 @@
PyObject * libxml_xmlParserInputBufferPtrWrap(xmlParserInputBufferPtr buffer);
PyObject * libxml_xmlRegexpPtrWrap(xmlRegexpPtr regexp);
PyObject * libxml_xmlTextReaderPtrWrap(xmlTextReaderPtr reader);
+PyObject * libxml_xmlTextReaderLocatorPtrWrap(xmlTextReaderLocatorPtr locator);
xmlXPathObjectPtr libxml_xmlXPathObjectPtrConvert(PyObject * obj);
-
-/*
- * Data structure that makes the link from the parser context
- * to the python wrapper.
- */
-typedef struct
-{
- PyObject *errorFunc;
- PyObject *errorFuncArg;
- PyObject *warningFunc;
- PyObject *warningFuncArg;
-} xmlParserCtxtPyCtxt;
-typedef xmlParserCtxtPyCtxt *xmlParserCtxtPyCtxtPtr;
-