1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-18 16:08:59 +03:00

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
This commit is contained in:
Daniel Veillard
2004-01-06 22:54:57 +00:00
parent 5d4cba413a
commit 46da46493f
8 changed files with 157 additions and 1 deletions

View File

@@ -641,3 +641,21 @@ libxml_xmlRelaxNGValidCtxtPtrWrap(xmlRelaxNGValidCtxtPtr valid)
return (ret);
}
#endif /* LIBXML_SCHEMAS_ENABLED */
PyObject *
libxml_xmlErrorPtrWrap(xmlErrorPtr error)
{
PyObject *ret;
#ifdef DEBUG
printf("libxml_xmlErrorPtrWrap: error = %p\n", error);
#endif
if (error == NULL) {
Py_INCREF(Py_None);
return (Py_None);
}
ret =
PyCObject_FromVoidPtrAndDesc((void *) error,
(char *) "xmlErrorPtr", NULL);
return (ret);
}