1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-27 18:50:07 +03:00

python: Fix callback signature

Found with UBSan.
This commit is contained in:
Nick Wellnhofer 2023-12-13 14:14:15 +01:00
parent 862e9ce0e6
commit 0e201722e4

View File

@ -1915,7 +1915,7 @@ typedef xmlTextReaderPyCtxt *xmlTextReaderPyCtxtPtr;
static void
libxml_xmlTextReaderErrorCallback(void *arg,
const char *msg,
int severity,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator)
{
xmlTextReaderPyCtxt *pyCtxt = (xmlTextReaderPyCtxt *)arg;
@ -1987,7 +1987,7 @@ libxml_xmlTextReaderSetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *a
Py_XINCREF(pyobj_arg);
pyCtxt->arg = pyobj_arg;
xmlTextReaderSetErrorHandler(reader,
(xmlTextReaderErrorFunc) libxml_xmlTextReaderErrorCallback,
libxml_xmlTextReaderErrorCallback,
pyCtxt);
}