Commit d0463560 authored by Daniel Veillard's avatar Daniel Veillard

Applied the last patches from Gary, cleanup, activated threading all user

* include/libxml/SAX.h include/libxml/globals.h include/libxml/parser.h
  include/libxml/parserInternals.h include/libxml/tree.h
  include/libxml/xmlerror.h HTMLparser.c SAX.c error.c globals.c
  nanoftp.c nanohttp.c parser.c parserInternals.c testDocbook.c
  testHTML.c testSAX.c tree.c uri.c xlink.c xmlmemory.c:
  Applied the last patches from Gary, cleanup, activated threading
  all user accessible global variables are now handled in globals.[ch]
  Still a bit rought but make tests passes with either
  --with-threads defined at configure time or not.
* Makefile.am example/Makefile.am: added globals.[ch] and threads
  linking options
Daniel
parent b847864f
Sat Oct 13 11:08:20 CEST 2001 Daniel Veillard <daniel@veillard.com>
* include/libxml/SAX.h include/libxml/globals.h include/libxml/parser.h
include/libxml/parserInternals.h include/libxml/tree.h
include/libxml/xmlerror.h HTMLparser.c SAX.c error.c globals.c
nanoftp.c nanohttp.c parser.c parserInternals.c testDocbook.c
testHTML.c testSAX.c tree.c uri.c xlink.c xmlmemory.c:
Applied the last patches from Gary, cleanup, activated threading
all user accessible global variables are now handled in globals.[ch]
Still a bit rought but make tests passes with either
--with-threads defined at configure time or not.
* Makefile.am example/Makefile.am: added globals.[ch] and threads
linking options
Fri Oct 12 19:25:55 CEST 2001 Daniel Veillard <daniel@veillard.com>
* Makefile.am include/libxml/Makefile.am
......
......@@ -3557,6 +3557,8 @@ static int
htmlParseDocument(htmlParserCtxtPtr ctxt) {
xmlDtdPtr dtd;
xmlInitParser();
htmlDefaultSAXHandlerInit();
ctxt->html = 1;
......@@ -4669,6 +4671,8 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
htmlParserInputPtr inputStream;
xmlParserInputBufferPtr buf;
xmlInitParser();
buf = xmlAllocParserInputBuffer(enc);
if (buf == NULL) return(NULL);
......@@ -4745,6 +4749,8 @@ htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void
htmlDocPtr ret;
htmlParserCtxtPtr ctxt;
xmlInitParser();
if (cur == NULL) return(NULL);
......@@ -4869,6 +4875,8 @@ htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr s
htmlParserCtxtPtr ctxt;
htmlSAXHandlerPtr oldsax = NULL;
xmlInitParser();
ctxt = htmlCreateFileParserCtxt(filename, encoding);
if (ctxt == NULL) return(NULL);
if (sax != NULL) {
......
......@@ -23,14 +23,14 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \
xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \
catalog.c threads.c strio.c trio.c
catalog.c globals.c threads.c strio.c trio.c
else
libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
valid.c xlink.c HTMLparser.c HTMLtree.c debugXML.c xpath.c \
xpointer.c xinclude.c nanohttp.c nanoftp.c DOCBparser.c \
catalog.c threads.c
catalog.c globals.c threads.c
endif
......
......@@ -88,14 +88,6 @@ getColumnNumber(void *ctx)
return(ctxt->input->col);
}
/*
* The default SAX Locator.
*/
xmlSAXLocator xmlDefaultSAXLocator = {
getPublicId, getSystemId, getLineNumber, getColumnNumber
};
/**
* isStandalone:
* @ctx: the user data (XML parser context)
......@@ -1667,118 +1659,64 @@ cdataBlock(void *ctx, const xmlChar *value, int len)
}
}
/*
* Default handler for XML, builds the DOM tree
*/
xmlSAXHandler xmlDefaultSAXHandler = {
internalSubset,
isStandalone,
hasInternalSubset,
hasExternalSubset,
resolveEntity,
getEntity,
entityDecl,
notationDecl,
attributeDecl,
elementDecl,
unparsedEntityDecl,
setDocumentLocator,
startDocument,
endDocument,
startElement,
endElement,
reference,
characters,
characters,
processingInstruction,
comment,
xmlParserWarning,
xmlParserError,
xmlParserError,
getParameterEntity,
cdataBlock,
externalSubset,
};
/**
* xmlDefaultSAXHandlerInit:
*
* Initialize the default SAX handler
*/
void
xmlDefaultSAXHandlerInit(void)
initxmlDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
{
static int xmlSAXInitialized = 0;
if (xmlSAXInitialized)
if(hdlr->initialized == 1)
return;
xmlDefaultSAXHandler.internalSubset = internalSubset;
xmlDefaultSAXHandler.externalSubset = externalSubset;
xmlDefaultSAXHandler.isStandalone = isStandalone;
xmlDefaultSAXHandler.hasInternalSubset = hasInternalSubset;
xmlDefaultSAXHandler.hasExternalSubset = hasExternalSubset;
xmlDefaultSAXHandler.resolveEntity = resolveEntity;
xmlDefaultSAXHandler.getEntity = getEntity;
xmlDefaultSAXHandler.getParameterEntity = getParameterEntity;
xmlDefaultSAXHandler.entityDecl = entityDecl;
xmlDefaultSAXHandler.attributeDecl = attributeDecl;
xmlDefaultSAXHandler.elementDecl = elementDecl;
xmlDefaultSAXHandler.notationDecl = notationDecl;
xmlDefaultSAXHandler.unparsedEntityDecl = unparsedEntityDecl;
xmlDefaultSAXHandler.setDocumentLocator = setDocumentLocator;
xmlDefaultSAXHandler.startDocument = startDocument;
xmlDefaultSAXHandler.endDocument = endDocument;
xmlDefaultSAXHandler.startElement = startElement;
xmlDefaultSAXHandler.endElement = endElement;
xmlDefaultSAXHandler.reference = reference;
xmlDefaultSAXHandler.characters = characters;
xmlDefaultSAXHandler.cdataBlock = cdataBlock;
xmlDefaultSAXHandler.ignorableWhitespace = characters;
xmlDefaultSAXHandler.processingInstruction = processingInstruction;
xmlDefaultSAXHandler.comment = comment;
if (xmlGetWarningsDefaultValue == 0)
xmlDefaultSAXHandler.warning = NULL;
hdlr->internalSubset = internalSubset;
hdlr->externalSubset = externalSubset;
hdlr->isStandalone = isStandalone;
hdlr->hasInternalSubset = hasInternalSubset;
hdlr->hasExternalSubset = hasExternalSubset;
hdlr->resolveEntity = resolveEntity;
hdlr->getEntity = getEntity;
hdlr->getParameterEntity = getParameterEntity;
hdlr->entityDecl = entityDecl;
hdlr->attributeDecl = attributeDecl;
hdlr->elementDecl = elementDecl;
hdlr->notationDecl = notationDecl;
hdlr->unparsedEntityDecl = unparsedEntityDecl;
hdlr->setDocumentLocator = setDocumentLocator;
hdlr->startDocument = startDocument;
hdlr->endDocument = endDocument;
hdlr->startElement = startElement;
hdlr->endElement = endElement;
hdlr->reference = reference;
hdlr->characters = characters;
hdlr->cdataBlock = cdataBlock;
hdlr->ignorableWhitespace = characters;
hdlr->processingInstruction = processingInstruction;
hdlr->comment = comment;
/* if (xmlGetWarningsDefaultValue == 0) */
if (warning == 0)
hdlr->warning = NULL;
else
xmlDefaultSAXHandler.warning = xmlParserWarning;
xmlDefaultSAXHandler.error = xmlParserError;
xmlDefaultSAXHandler.fatalError = xmlParserError;
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
xmlSAXInitialized = 1;
hdlr->initialized = 1;
}
#ifdef LIBXML_HTML_ENABLED
/*
* Default handler for HTML, builds the DOM tree
/**
* xmlDefaultSAXHandlerInit:
*
* Initialize the default SAX handler
*/
xmlSAXHandler htmlDefaultSAXHandler = {
internalSubset,
NULL,
NULL,
NULL,
NULL,
getEntity,
NULL,
NULL,
NULL,
NULL,
NULL,
setDocumentLocator,
startDocument,
endDocument,
startElement,
endElement,
NULL,
characters,
ignorableWhitespace,
NULL,
comment,
xmlParserWarning,
xmlParserError,
xmlParserError,
getParameterEntity,
cdataBlock,
NULL,
};
void
xmlDefaultSAXHandlerInit(void)
{
initxmlDefaultSAXHandler(&xmlDefaultSAXHandler, xmlGetWarningsDefaultValue);
}
#ifdef LIBXML_HTML_ENABLED
/**
* htmlDefaultSAXHandlerInit:
......@@ -1786,77 +1724,93 @@ xmlSAXHandler htmlDefaultSAXHandler = {
* Initialize the default SAX handler
*/
void
htmlDefaultSAXHandlerInit(void)
inithtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
{
static int htmlSAXInitialized = 0;
if (htmlSAXInitialized)
if(hdlr->initialized == 1)
return;
htmlDefaultSAXHandler.internalSubset = internalSubset;
htmlDefaultSAXHandler.externalSubset = NULL;
htmlDefaultSAXHandler.isStandalone = NULL;
htmlDefaultSAXHandler.hasInternalSubset = NULL;
htmlDefaultSAXHandler.hasExternalSubset = NULL;
htmlDefaultSAXHandler.resolveEntity = NULL;
htmlDefaultSAXHandler.getEntity = getEntity;
htmlDefaultSAXHandler.getParameterEntity = NULL;
htmlDefaultSAXHandler.entityDecl = NULL;
htmlDefaultSAXHandler.attributeDecl = NULL;
htmlDefaultSAXHandler.elementDecl = NULL;
htmlDefaultSAXHandler.notationDecl = NULL;
htmlDefaultSAXHandler.unparsedEntityDecl = NULL;
htmlDefaultSAXHandler.setDocumentLocator = setDocumentLocator;
htmlDefaultSAXHandler.startDocument = startDocument;
htmlDefaultSAXHandler.endDocument = endDocument;
htmlDefaultSAXHandler.startElement = startElement;
htmlDefaultSAXHandler.endElement = endElement;
htmlDefaultSAXHandler.reference = NULL;
htmlDefaultSAXHandler.characters = characters;
htmlDefaultSAXHandler.cdataBlock = cdataBlock;
htmlDefaultSAXHandler.ignorableWhitespace = ignorableWhitespace;
htmlDefaultSAXHandler.processingInstruction = NULL;
htmlDefaultSAXHandler.comment = comment;
htmlDefaultSAXHandler.warning = xmlParserWarning;
htmlDefaultSAXHandler.error = xmlParserError;
htmlDefaultSAXHandler.fatalError = xmlParserError;
htmlSAXInitialized = 1;
hdlr->internalSubset = internalSubset;
hdlr->externalSubset = NULL;
hdlr->isStandalone = NULL;
hdlr->hasInternalSubset = NULL;
hdlr->hasExternalSubset = NULL;
hdlr->resolveEntity = NULL;
hdlr->getEntity = getEntity;
hdlr->getParameterEntity = NULL;
hdlr->entityDecl = NULL;
hdlr->attributeDecl = NULL;
hdlr->elementDecl = NULL;
hdlr->notationDecl = NULL;
hdlr->unparsedEntityDecl = NULL;
hdlr->setDocumentLocator = setDocumentLocator;
hdlr->startDocument = startDocument;
hdlr->endDocument = endDocument;
hdlr->startElement = startElement;
hdlr->endElement = endElement;
hdlr->reference = NULL;
hdlr->characters = characters;
hdlr->cdataBlock = cdataBlock;
hdlr->ignorableWhitespace = ignorableWhitespace;
hdlr->processingInstruction = NULL;
hdlr->comment = comment;
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
hdlr->initialized = 1;
}
/**
* htmlDefaultSAXHandlerInit:
*
* Initialize the default SAX handler
*/
void
htmlDefaultSAXHandlerInit(void)
{
inithtmlDefaultSAXHandler(&htmlDefaultSAXHandler);
}
#endif /* LIBXML_HTML_ENABLED */
#ifdef LIBXML_DOCB_ENABLED
/*
* Default handler for SGML DocBook, builds the DOM tree
*/
xmlSAXHandler docbDefaultSAXHandler = {
internalSubset,
isStandalone,
hasInternalSubset,
hasExternalSubset,
resolveEntity,
getEntity,
entityDecl,
NULL,
NULL,
NULL,
NULL,
setDocumentLocator,
startDocument,
endDocument,
startElement,
endElement,
reference,
characters,
ignorableWhitespace,
NULL,
comment,
xmlParserWarning,
xmlParserError,
xmlParserError,
getParameterEntity,
NULL,
NULL,
};
void
initdocbDefaultSAXHandler(xmlSAXHandler *hdlr)
{
if(hdlr->initialized == 1)
return;
hdlr->internalSubset = internalSubset;
hdlr->externalSubset = NULL;
hdlr->isStandalone = isStandalone;
hdlr->hasInternalSubset = hasInternalSubset;
hdlr->hasExternalSubset = hasExternalSubset;
hdlr->resolveEntity = resolveEntity;
hdlr->getEntity = getEntity;
hdlr->getParameterEntity = NULL;
hdlr->entityDecl = entityDecl;
hdlr->attributeDecl = NULL;
hdlr->elementDecl = NULL;
hdlr->notationDecl = NULL;
hdlr->unparsedEntityDecl = NULL;
hdlr->setDocumentLocator = setDocumentLocator;
hdlr->startDocument = startDocument;
hdlr->endDocument = endDocument;
hdlr->startElement = startElement;
hdlr->endElement = endElement;
hdlr->reference = reference;
hdlr->characters = characters;
hdlr->cdataBlock = NULL;
hdlr->ignorableWhitespace = ignorableWhitespace;
hdlr->processingInstruction = NULL;
hdlr->comment = comment;
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
hdlr->initialized = 1;
}
/**
* docbDefaultSAXHandlerInit:
......@@ -1866,39 +1820,7 @@ xmlSAXHandler docbDefaultSAXHandler = {
void
docbDefaultSAXHandlerInit(void)
{
static int docbSAXInitialized = 0;
if (docbSAXInitialized)
return;
docbDefaultSAXHandler.internalSubset = internalSubset;
docbDefaultSAXHandler.externalSubset = NULL;
docbDefaultSAXHandler.isStandalone = isStandalone;
docbDefaultSAXHandler.hasInternalSubset = hasInternalSubset;
docbDefaultSAXHandler.hasExternalSubset = hasExternalSubset;
docbDefaultSAXHandler.resolveEntity = resolveEntity;
docbDefaultSAXHandler.getEntity = getEntity;
docbDefaultSAXHandler.getParameterEntity = NULL;
docbDefaultSAXHandler.entityDecl = entityDecl;
docbDefaultSAXHandler.attributeDecl = NULL;
docbDefaultSAXHandler.elementDecl = NULL;
docbDefaultSAXHandler.notationDecl = NULL;
docbDefaultSAXHandler.unparsedEntityDecl = NULL;
docbDefaultSAXHandler.setDocumentLocator = setDocumentLocator;
docbDefaultSAXHandler.startDocument = startDocument;
docbDefaultSAXHandler.endDocument = endDocument;
docbDefaultSAXHandler.startElement = startElement;
docbDefaultSAXHandler.endElement = endElement;
docbDefaultSAXHandler.reference = reference;
docbDefaultSAXHandler.characters = characters;
docbDefaultSAXHandler.cdataBlock = NULL;
docbDefaultSAXHandler.ignorableWhitespace = ignorableWhitespace;
docbDefaultSAXHandler.processingInstruction = NULL;
docbDefaultSAXHandler.comment = comment;
docbDefaultSAXHandler.warning = xmlParserWarning;
docbDefaultSAXHandler.error = xmlParserError;
docbDefaultSAXHandler.fatalError = xmlParserError;
docbSAXInitialized = 1;
initdocbDefaultSAXHandler(&docbDefaultSAXHandler);
}
#endif /* LIBXML_DOCB_ENABLED */
......@@ -78,9 +78,9 @@ if __name__ == "__main__":
writeline(global_functions_hdr,"(*(__"+fields[1]+"()))")
writeline(global_functions_hdr,"#else")
if len(fields) == 3:
writeline(global_functions_hdr,"extern "+fields[0]+" "+fields[1]+fields[2]+";")
writeline(global_functions_hdr,"LIBXML_DLL_IMPORT extern "+fields[0]+" "+fields[1]+fields[2]+";")
else:
writeline(global_functions_hdr,"extern "+fields[0]+" "+fields[1]+";")
writeline(global_functions_hdr,"LIBXML_DLL_IMPORT extern "+fields[0]+" "+fields[1]+";")
writeline(global_functions_hdr,"#endif")
# Update the implementation file
writeline(global_functions_impl)
......@@ -96,7 +96,7 @@ if __name__ == "__main__":
writeline(global_functions_impl, " if (IS_MAIN_THREAD)")
writeline(global_functions_impl, "\treturn (&"+fields[1]+");")
writeline(global_functions_impl, " else")
writeline(global_functions_impl, "\treturn (&get_glob_struct()->"+fields[1]+");")
writeline(global_functions_impl, "\treturn (&xmlGetGlobalState()->"+fields[1]+");")
writeline(global_functions_impl, "}")
# Terminate the header file with appropriate boilerplate
writeline(global_functions_hdr)
......
......@@ -69,9 +69,14 @@ xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
va_end(args);
}
xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc;
void *xmlGenericErrorContext = NULL;
void
initGenericErrorDefaultFunc(xmlGenericErrorFunc *handler)
{
if (handler == NULL)
xmlGenericError = xmlGenericErrorDefaultFunc;
else
(*handler) = xmlGenericErrorDefaultFunc;
}
/**
* xmlSetGenericErrorFunc:
......
......@@ -7,5 +7,5 @@ INCLUDES = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include -I@srcdir@
LDADD = $(top_builddir)/libxml2.la @Z_LIBS@ $(ICONV_LIBS) -lm
LDADD = $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) -lm
......@@ -13,8 +13,7 @@
#include "libxml.h"
#include <libxml/threads.h>
#include <libxml/globals.h>
#include <libxml/xmlmemory.h>
/*
* Helpful Macro
......@@ -38,10 +37,16 @@
************************************************************************/
const char *xmlParserVersion = LIBXML_VERSION_STRING;
/*
* Memory allocation routines
*/
#if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
extern void xmlMemFree(void *ptr);
extern void * xmlMemMalloc(size_t size);
extern void * xmlMemRealloc(void *ptr,size_t size);
extern char * xmlMemoryStrdup(const char *str);
xmlFreeFunc xmlFree = (xmlFreeFunc) xmlMemFree;
xmlMallocFunc xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
......@@ -53,6 +58,36 @@ xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) strdup;
#endif
#include <libxml/threads.h>
#include <libxml/globals.h>
#include <libxml/SAX.h>
#undef docbDefaultSAXHandler
#undef htmlDefaultSAXHandler
#undef oldXMLWDcompatibility
#undef xmlBufferAllocScheme
#undef xmlDefaultBufferSize
#undef xmlDefaultSAXHandler
#undef xmlDefaultSAXLocator
#undef xmlDoValidityCheckingDefaultValue
#undef xmlGenericError
#undef xmlGenericErrorContext
#undef xmlGetWarningsDefaultValue
#undef xmlIndentTreeOutput
#undef xmlKeepBlanksDefaultValue
#undef xmlLineNumbersDefaultValue
#undef xmlLoadExtDtdDefaultValue
#undef xmlParserDebugEntities
#undef xmlParserVersion
#undef xmlPedanticParserDefaultValue
#undef xmlSaveNoEmptyTags
#undef xmlSubstituteEntitiesDefaultValue
#undef xmlFree
#undef xmlMalloc
#undef xmlMemStrdup
#undef xmlRealloc
/*
* Buffers stuff
*/
......@@ -62,6 +97,7 @@ int xmlDefaultBufferSize = BASE_BUFFER_SIZE;
/*
* Parser defaults
*/
int oldXMLWDcompatibility = 0; /* DEPRECATED */
int xmlParserDebugEntities = 0;
int xmlDoValidityCheckingDefaultValue = 0;
......@@ -264,7 +300,7 @@ __docbDefaultSAXHandler(void) {
if (IS_MAIN_THREAD)
return (&docbDefaultSAXHandler);
else
return (&get_glob_struct()->docbDefaultSAXHandler);
return (&xmlGetGlobalState()->docbDefaultSAXHandler);
}
extern xmlSAXHandler htmlDefaultSAXHandler;
......@@ -274,7 +310,7 @@ __htmlDefaultSAXHandler(void) {
if (IS_MAIN_THREAD)
return (&htmlDefaultSAXHandler);
else
return (&get_glob_struct()->htmlDefaultSAXHandler);
return (&xmlGetGlobalState()->htmlDefaultSAXHandler);
}
extern int oldXMLWDcompatibility;
......@@ -284,7 +320,7 @@ __oldXMLWDcompatibility(void) {
if (IS_MAIN_THREAD)
return (&oldXMLWDcompatibility);
else
return (&get_glob_struct()->oldXMLWDcompatibility);
return (&xmlGetGlobalState()->oldXMLWDcompatibility);
}
extern xmlBufferAllocationScheme xmlBufferAllocScheme;
......@@ -294,7 +330,7 @@ __xmlBufferAllocScheme(void) {
if (IS_MAIN_THREAD)
return (&xmlBufferAllocScheme);
else
return (&get_glob_struct()->xmlBufferAllocScheme);
return (&xmlGetGlobalState()->xmlBufferAllocScheme);
}
extern int xmlDefaultBufferSize;
......@@ -304,7 +340,7 @@ __xmlDefaultBufferSize(void) {
if (IS_MAIN_THREAD)
return (&xmlDefaultBufferSize);
else
return (&get_glob_struct()->xmlDefaultBufferSize);
return (&xmlGetGlobalState()->xmlDefaultBufferSize);
}
extern xmlSAXHandler xmlDefaultSAXHandler;
......@@ -314,7 +350,7 @@ __xmlDefaultSAXHandler(void) {
if (IS_MAIN_THREAD)
return (&xmlDefaultSAXHandler);
else
return (&get_glob_struct()->xmlDefaultSAXHandler);
return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
}
extern xmlSAXLocator xmlDefaultSAXLocator;
......@@ -324,7 +360,7 @@ __xmlDefaultSAXLocator(void) {
if (IS_MAIN_THREAD)
return (&xmlDefaultSAXLocator);
else
return (&get_glob_struct()->xmlDefaultSAXLocator);
return (&xmlGetGlobalState()->xmlDefaultSAXLocator);
}
extern int xmlDoValidityCheckingDefaultValue;
......@@ -334,7 +370,7 @@ __xmlDoValidityCheckingDefaultValue(void) {
if (IS_MAIN_THREAD)
return (&xmlDoValidityCheckingDefaultValue);
else
return (&get_glob_struct()->xmlDoValidityCheckingDefaultValue);