forked from pool/libxml2
Accepting request 536921 from home:matejcik:py3port
- libxml2-python3-unicode-errors.patch: work around an issue with libxml2 supplied error strings being undecodable UTF-8 (bsc#1065270) OBS-URL: https://build.opensuse.org/request/show/536921 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxml2?expand=0&rev=123
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
---
|
||||
python/libxml.c | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: libxml2-2.11.1/python/libxml.c
|
||||
Index: libxml2-2.9.5/python/libxml.c
|
||||
===================================================================
|
||||
--- libxml2-2.11.1.orig/python/libxml.c
|
||||
+++ libxml2-2.11.1/python/libxml.c
|
||||
@@ -1606,6 +1606,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
|
||||
--- libxml2-2.9.5.orig/python/libxml.c
|
||||
+++ libxml2-2.9.5/python/libxml.c
|
||||
@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
|
||||
PyObject *message;
|
||||
PyObject *result;
|
||||
char str[1000];
|
||||
@@ -14,7 +10,7 @@ Index: libxml2-2.11.1/python/libxml.c
|
||||
|
||||
#ifdef DEBUG_ERROR
|
||||
printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
|
||||
@@ -1622,12 +1623,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
|
||||
@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
|
||||
str[999] = 0;
|
||||
va_end(ap);
|
||||
|
||||
@@ -30,7 +26,7 @@ Index: libxml2-2.11.1/python/libxml.c
|
||||
- message = libxml_charPtrConstWrap(str);
|
||||
+ message = libxml_charPtrConstWrap(ptr);
|
||||
PyTuple_SetItem(list, 1, message);
|
||||
result = PyObject_CallObject(libxml_xmlPythonErrorFuncHandler, list);
|
||||
result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
|
||||
+ /* Forget any errors caused in the error handler. */
|
||||
+ PyErr_Clear();
|
||||
Py_XDECREF(list);
|
||||
|
||||
Reference in New Issue
Block a user