summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/python-libxml2-utf8.patch
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2025-09-30 16:54:14 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2025-09-30 16:54:14 +0900
commit3dfd671fb70c22c537f9f8cc7ebdc29c2e206661 (patch)
tree5df82c0c77ce45fb414227a95652aed136f07734 /gnu/packages/patches/python-libxml2-utf8.patch
parentc5348a51cbb55c75e64a972bf55a33f982fb6e90 (diff)
parent83305987401f215100847ad16a51716b8bcc7d7c (diff)
Merge branch 'mesa-updates'
* mesa-updates: (173 commits) tests/pack: Fix rpm tests. gnu: rpm: Restore localstatedir to /var. tests/builders: Avoid races in unpack tests. gnu: friction: Build with ffmpeg-6. gnu: php: Disable the bug65148 and bug46347 flaky tests. gnu: php: Add autoconf to native inputs. gnu: gnome-planner: Some follow-ups. gnu: gnome-planner: Update to 0.14.92. gnu: Remove scrollkeeper dependencies. Revert "gnu: msamr: Update to (git-version 1.1.4 revision commit)." gnu: php: Update to 8.3.26. gnu: php: Run tests in parallel. gnu: php: Improve style. gnu: ungoogled-chromium: Fix build with libxml2@2.14. gnu: kodi: Build with ffmpeg@6. gnu: emacs-next-minimal: Fix test. gnu: vlc: Build with ffmpeg@6. gnu: qtwebengine: Fix build. gnu: python-html5-parser: Fix build. gnu: gnucash: Update to 5.13. ... Change-Id: I61bcbe2de06cb030113c9c51bb7d2aa7d3b187e9
Diffstat (limited to 'gnu/packages/patches/python-libxml2-utf8.patch')
-rw-r--r--gnu/packages/patches/python-libxml2-utf8.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/gnu/packages/patches/python-libxml2-utf8.patch b/gnu/packages/patches/python-libxml2-utf8.patch
index e39672faa1..9c4ca4fdb2 100644
--- a/gnu/packages/patches/python-libxml2-utf8.patch
+++ b/gnu/packages/patches/python-libxml2-utf8.patch
@@ -6,18 +6,18 @@ that 'itstool' stumbles upon when processing UTF-8 data:
Patch by Jan Matejek
from <https://bugzilla.opensuse.org/show_bug.cgi?id=1065270>.
---- libxml2-2.9.5.orig/python/libxml.c
-+++ libxml2-2.9.5/python/libxml.c
-@@ -1620,6 +1620,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
+--- a/python/libxml.c
++++ b/python/libxml.c
+@@ -1499,6 +1499,7 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
PyObject *message;
PyObject *result;
char str[1000];
+ unsigned char *ptr = (unsigned char *)str;
- #ifdef DEBUG_ERROR
- printf("libxml_xmlErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
-@@ -1636,12 +1637,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNU
- str[999] = 0;
+ if (libxml_xmlPythonErrorFuncHandler == NULL) {
+ va_start(ap, msg);
+@@ -1510,12 +1511,20 @@ libxml_xmlErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, const char *msg,
+ str[999] = 0;
va_end(ap);
+#if PY_MAJOR_VERSION >= 3
@@ -32,7 +32,7 @@ from <https://bugzilla.opensuse.org/show_bug.cgi?id=1065270>.
- message = libxml_charPtrConstWrap(str);
+ message = libxml_charPtrConstWrap(ptr);
PyTuple_SetItem(list, 1, message);
- result = PyEval_CallObject(libxml_xmlPythonErrorFuncHandler, list);
+ result = PyObject_CallObject(libxml_xmlPythonErrorFuncHandler, list);
+ /* Forget any errors caused in the error handler. */
+ PyErr_Clear();
Py_XDECREF(list);