misc: adjust to structured error callback argument change in libxml2 2.12 (#86080)
gitea/lasso/pipeline/head This commit looks good Details

This commit is contained in:
Benjamin Dauvergne 2024-01-24 15:15:39 +01:00
parent 9767cdf764
commit cbe2c45455
3 changed files with 17 additions and 2 deletions

2
NEWS
View File

@ -9,6 +9,8 @@ Future
- Annotate lasso_*_signature_method functions with LASSO_EXPORT (#86076)
- Fix implicit function declaration errors, patch provided by Rob Crittenden
from RedHat (#85340)
- Adjust to structured error callback argument change in libxml2 2.12, patch
provided by Florian Wiemer of RedHat (#86080)
2.8.2 - March 14th 2023
-----------------------

View File

@ -138,7 +138,13 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
#include "types.c"
static void
lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data, xmlErrorPtr error)
lasso_xml_structured_error_func(G_GNUC_UNUSED void *user_data,
#if LIBXML_VERSION >= 21200
const xmlError *error
#else
xmlErrorPtr error
#endif
)
{
g_log("libxml2", G_LOG_LEVEL_DEBUG, "libxml2: %s", error->message);
}

View File

@ -1450,7 +1450,14 @@ lasso_concat_url_query(const char *url, const char *query)
}
}
static void structuredErrorFunc (void *userData, xmlErrorPtr error) {
static void structuredErrorFunc (void *userData,
#if LIBXML_VERSION >= 21200
const xmlError *error
#else
xmlErrorPtr error
#endif
)
{
*(int*)userData = error->code;
}