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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user