applied patch from Stephane Bidoul for structured error handling from

* python/libxml2-python-api.xml python/libxml_wrap.h python/types.c
  python/tests/Makefile.am python/tests/tstLastError.py: applied
  patch from Stephane Bidoul for structured error handling from
  python, and the associated test
Daniel
diff --git a/python/libxml_wrap.h b/python/libxml_wrap.h
index 064f8a8..09fc77f 100644
--- a/python/libxml_wrap.h
+++ b/python/libxml_wrap.h
@@ -109,6 +109,14 @@
 
 typedef struct {
     PyObject_HEAD
+    xmlErrorPtr obj;
+} PyError_Object;
+
+#define PyError_Get(v) (((v) == Py_None) ? NULL : \
+	(((PyError_Object *)(v))->obj))
+
+typedef struct {
+    PyObject_HEAD
     xmlOutputBufferPtr obj;
 } PyoutputBuffer_Object;
 
@@ -194,3 +202,4 @@
 PyObject * libxml_xmlRelaxNGParserCtxtPtrWrap(xmlRelaxNGParserCtxtPtr ctxt);
 PyObject * libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid);
 #endif /* LIBXML_SCHEMAS_ENABLED */
+PyObject * libxml_xmlErrorPtrWrap(xmlErrorPtr error);