From e46c648974cc99e57177226971bda09320156c93 Mon Sep 17 00:00:00 2001 From: Thomas Beutlich Date: Wed, 3 Apr 2024 20:49:03 +0200 Subject: [PATCH] Replace call to deprecated initGenericErrorDefaultFunc --- ExternData/Resources/C-Sources/ED_XML2File.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ExternData/Resources/C-Sources/ED_XML2File.c b/ExternData/Resources/C-Sources/ED_XML2File.c index fa275884..db27c0dc 100644 --- a/ExternData/Resources/C-Sources/ED_XML2File.c +++ b/ExternData/Resources/C-Sources/ED_XML2File.c @@ -68,7 +68,7 @@ typedef struct { ED_LOGGING_FUNC log; } XML2File; -static void _errorFunc(void* ctx, const char* string, ...) +static void errorFunc(void* ctx, const char* string, ...) { va_list args; va_start(args, string); @@ -76,8 +76,6 @@ static void _errorFunc(void* ctx, const char* string, ...) va_end(args); } -static xmlGenericErrorFunc errorFunc = _errorFunc; - void* ED_createXML2(const char* fileName, const char** ns, size_t sizeNS, int verbose, int detectMissingData) { size_t i; @@ -96,7 +94,7 @@ void* ED_createXML2(const char* fileName, const char** ns, size_t sizeNS, int ve /* Init libxml */ xmlInitParser(); - initGenericErrorDefaultFunc(&errorFunc); + xmlSetGenericErrorFunc(NULL, errorFunc); if (verbose == 1) { /* Print info message, that file is loading */