Skip to content

Commit

Permalink
Replace call to deprecated initGenericErrorDefaultFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Apr 3, 2024
1 parent a2d6592 commit e46c648
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ExternData/Resources/C-Sources/ED_XML2File.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,14 @@ 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);
ModelicaVFormatMessage(string, args);
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;
Expand All @@ -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 */
Expand Down

0 comments on commit e46c648

Please sign in to comment.