mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Keith Isdale complained rightly that xmlInitParser() did not preserve
* parser.c error.c: Keith Isdale complained rightly that xmlInitParser() did not preserve value set by xmlSetGenericErrorFunc Daniel
This commit is contained in:
5
parser.c
5
parser.c
@ -10286,6 +10286,7 @@ xmlSetEntityReferenceFunc(xmlEntityReferenceFunc func)
|
||||
#include <libxml/xpath.h>
|
||||
#endif
|
||||
|
||||
extern void xmlGenericErrorDefaultFunc(void *ctx, const char *msg, ...);
|
||||
static int xmlParserInitialized = 0;
|
||||
|
||||
/**
|
||||
@ -10301,7 +10302,9 @@ xmlInitParser(void) {
|
||||
if (xmlParserInitialized != 0)
|
||||
return;
|
||||
|
||||
initGenericErrorDefaultFunc(NULL);
|
||||
if ((xmlGenericError == xmlGenericErrorDefaultFunc) ||
|
||||
(xmlGenericError == NULL))
|
||||
initGenericErrorDefaultFunc(NULL);
|
||||
xmlInitThreads();
|
||||
xmlInitMemory();
|
||||
xmlInitCharEncodingHandlers();
|
||||
|
Reference in New Issue
Block a user