blob: a66f0e8fd788aa33947805bf1962fc687eb96a05 [file] [log] [blame]
Daniel Veillardb8478642001-10-12 17:29:10 +00001/*
2 * globals.c: definition and handling of the set of global variables
3 * of the library
4 *
5 * The bottom of this file is automatically generated by build_glob.py
6 * based on the description file global.data
7 *
8 * See Copyright for the status of this software.
9 *
10 * Gary Pennington <Gary.Pennington@uk.sun.com>
11 * daniel@veillard.com
12 */
13
14#include "libxml.h"
15
Daniel Veillarde7090612001-10-13 12:18:28 +000016#ifdef HAVE_STDLIB_H
Jaka Mocnik77d19ae2001-10-13 12:06:09 +000017#include <stdlib.h>
Daniel Veillarde7090612001-10-13 12:18:28 +000018#endif
Jaka Mocnik77d19ae2001-10-13 12:06:09 +000019#include <string.h>
20
Daniel Veillard3c01b1d2001-10-17 15:58:35 +000021#include <libxml/globals.h>
Daniel Veillarde7090612001-10-13 12:18:28 +000022#include <libxml/xmlmemory.h>
23
Daniel Veillard3c01b1d2001-10-17 15:58:35 +000024/* #define DEBUG_GLOBALS */
25
Daniel Veillardb8478642001-10-12 17:29:10 +000026/*
27 * Helpful Macro
28 */
Daniel Veillard3c01b1d2001-10-17 15:58:35 +000029#ifdef LIBXML_THREAD_ENABLED
30#define IS_MAIN_THREAD (xmlIsMainThread())
Daniel Veillardb8478642001-10-12 17:29:10 +000031#else
32#define IS_MAIN_THREAD 1
33#endif
34
35/************************************************************************
36 * *
37 * All the user accessible global variables of the library *
38 * *
39 ************************************************************************/
40
Daniel Veillardb8478642001-10-12 17:29:10 +000041/*
42 * Memory allocation routines
43 */
44#if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
Daniel Veillardd0463562001-10-13 09:15:48 +000045extern void xmlMemFree(void *ptr);
46extern void * xmlMemMalloc(size_t size);
47extern void * xmlMemRealloc(void *ptr,size_t size);
48extern char * xmlMemoryStrdup(const char *str);
49
Daniel Veillardb8478642001-10-12 17:29:10 +000050xmlFreeFunc xmlFree = (xmlFreeFunc) xmlMemFree;
51xmlMallocFunc xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
52xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
53xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
54#else
55xmlFreeFunc xmlFree = (xmlFreeFunc) free;
56xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc;
57xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
Daniel Veillardb82c1662001-12-09 14:00:54 +000058xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
Daniel Veillardb8478642001-10-12 17:29:10 +000059#endif
60
Daniel Veillardd0463562001-10-13 09:15:48 +000061#include <libxml/threads.h>
62#include <libxml/globals.h>
63#include <libxml/SAX.h>
64
65#undef docbDefaultSAXHandler
66#undef htmlDefaultSAXHandler
67#undef oldXMLWDcompatibility
68#undef xmlBufferAllocScheme
69#undef xmlDefaultBufferSize
70#undef xmlDefaultSAXHandler
71#undef xmlDefaultSAXLocator
72#undef xmlDoValidityCheckingDefaultValue
73#undef xmlGenericError
74#undef xmlGenericErrorContext
75#undef xmlGetWarningsDefaultValue
76#undef xmlIndentTreeOutput
77#undef xmlKeepBlanksDefaultValue
78#undef xmlLineNumbersDefaultValue
79#undef xmlLoadExtDtdDefaultValue
80#undef xmlParserDebugEntities
81#undef xmlParserVersion
82#undef xmlPedanticParserDefaultValue
83#undef xmlSaveNoEmptyTags
84#undef xmlSubstituteEntitiesDefaultValue
85
86#undef xmlFree
87#undef xmlMalloc
88#undef xmlMemStrdup
89#undef xmlRealloc
90
Daniel Veillard3c01b1d2001-10-17 15:58:35 +000091const char *xmlParserVersion = LIBXML_VERSION_STRING;
92
Daniel Veillardb8478642001-10-12 17:29:10 +000093/*
94 * Buffers stuff
95 */
96xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT;
97int xmlDefaultBufferSize = BASE_BUFFER_SIZE;
98
99/*
100 * Parser defaults
101 */
Daniel Veillardd0463562001-10-13 09:15:48 +0000102
Daniel Veillardb8478642001-10-12 17:29:10 +0000103int oldXMLWDcompatibility = 0; /* DEPRECATED */
104int xmlParserDebugEntities = 0;
105int xmlDoValidityCheckingDefaultValue = 0;
106int xmlGetWarningsDefaultValue = 1;
107int xmlLoadExtDtdDefaultValue = 0;
108int xmlPedanticParserDefaultValue = 0;
109int xmlLineNumbersDefaultValue = 0;
110int xmlKeepBlanksDefaultValue = 1;
111int xmlSubstituteEntitiesDefaultValue = 0;
112
113/*
114 * Error handling
115 */
116
117/* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */
118/* Must initialize xmlGenericError in xmlInitParser */
Daniel Veillard635ef722001-10-29 11:48:19 +0000119void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
120 const char *msg,
121 ...);
122xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc;
Daniel Veillardb8478642001-10-12 17:29:10 +0000123void *xmlGenericErrorContext = NULL;
124
125/*
126 * output defaults
127 */
128int xmlIndentTreeOutput = 0;
129int xmlSaveNoEmptyTags = 0;
130
131/*
132 * Default handler for XML, builds the DOM tree
133 */
134xmlSAXHandler xmlDefaultSAXHandler = {
135 internalSubset,
136 isStandalone,
137 hasInternalSubset,
138 hasExternalSubset,
139 resolveEntity,
140 getEntity,
141 entityDecl,
142 notationDecl,
143 attributeDecl,
144 elementDecl,
145 unparsedEntityDecl,
146 setDocumentLocator,
147 startDocument,
148 endDocument,
149 startElement,
150 endElement,
151 reference,
152 characters,
153 characters,
154 processingInstruction,
155 comment,
156 xmlParserWarning,
157 xmlParserError,
158 xmlParserError,
159 getParameterEntity,
160 cdataBlock,
161 externalSubset,
162 0
163};
164
165/*
166 * The default SAX Locator.
167 */
168
169xmlSAXLocator xmlDefaultSAXLocator = {
170 getPublicId, getSystemId, getLineNumber, getColumnNumber
171};
172
173#ifdef LIBXML_HTML_ENABLED
174/*
175 * Default handler for HTML, builds the DOM tree
176 */
177xmlSAXHandler htmlDefaultSAXHandler = {
178 internalSubset,
179 NULL,
180 NULL,
181 NULL,
182 NULL,
183 getEntity,
184 NULL,
185 NULL,
186 NULL,
187 NULL,
188 NULL,
189 setDocumentLocator,
190 startDocument,
191 endDocument,
192 startElement,
193 endElement,
194 NULL,
195 characters,
196 ignorableWhitespace,
197 NULL,
198 comment,
199 xmlParserWarning,
200 xmlParserError,
201 xmlParserError,
202 getParameterEntity,
203 cdataBlock,
204 NULL,
205 0
206};
207#endif /* LIBXML_HTML_ENABLED */
208
209#ifdef LIBXML_DOCB_ENABLED
210/*
211 * Default handler for SGML DocBook, builds the DOM tree
212 */
213xmlSAXHandler docbDefaultSAXHandler = {
214 internalSubset,
215 isStandalone,
216 hasInternalSubset,
217 hasExternalSubset,
218 resolveEntity,
219 getEntity,
220 entityDecl,
221 NULL,
222 NULL,
223 NULL,
224 NULL,
225 setDocumentLocator,
226 startDocument,
227 endDocument,
228 startElement,
229 endElement,
230 reference,
231 characters,
232 ignorableWhitespace,
233 NULL,
234 comment,
235 xmlParserWarning,
236 xmlParserError,
237 xmlParserError,
238 getParameterEntity,
239 NULL,
240 NULL,
241 0
242};
243#endif /* LIBXML_DOCB_ENABLED */
244
245/**
246 * xmlInitializeGlobalState:
247 * @gs: a pointer to a newly allocated global state
248 *
249 * xmlInitializeGlobalState() initialize a global state with all the
250 * default values of the library.
251 */
252void
253xmlInitializeGlobalState(xmlGlobalStatePtr gs)
254{
Daniel Veillard3c01b1d2001-10-17 15:58:35 +0000255#ifdef DEBUG_GLOBALS
256 fprintf(stderr, "Initializing globals at %lu for thread %d\n",
257 (unsigned long) gs, xmlGetThreadId());
258#endif
259
Daniel Veillardb8478642001-10-12 17:29:10 +0000260 /*
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000261 * Perform initialization as required by libxml
Daniel Veillardb8478642001-10-12 17:29:10 +0000262 */
Daniel Veillard3c01b1d2001-10-17 15:58:35 +0000263 initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
Daniel Veillarda4617b82001-11-04 20:19:12 +0000264#ifdef LIBXML_DOCB_ENABLED
Daniel Veillardb8478642001-10-12 17:29:10 +0000265 initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
Daniel Veillarda4617b82001-11-04 20:19:12 +0000266#endif
267#ifdef LIBXML_HTML_ENABLED
Daniel Veillardb8478642001-10-12 17:29:10 +0000268 inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
Daniel Veillarda4617b82001-11-04 20:19:12 +0000269#endif
Daniel Veillard3c01b1d2001-10-17 15:58:35 +0000270 initGenericErrorDefaultFunc(&gs->xmlGenericError);
271
Daniel Veillardb8478642001-10-12 17:29:10 +0000272 gs->oldXMLWDcompatibility = 0;
273 gs->xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT;
274 gs->xmlDefaultBufferSize = BASE_BUFFER_SIZE;
275 initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
276 gs->xmlDefaultSAXLocator.getPublicId = getPublicId;
277 gs->xmlDefaultSAXLocator.getSystemId = getSystemId;
278 gs->xmlDefaultSAXLocator.getLineNumber = getLineNumber;
279 gs->xmlDefaultSAXLocator.getColumnNumber = getColumnNumber;
280 gs->xmlDoValidityCheckingDefaultValue = 0;
281#if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
282 gs->xmlFree = (xmlFreeFunc) xmlMemFree;
283 gs->xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
284 gs->xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
285 gs->xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
286#else
287 gs->xmlFree = (xmlFreeFunc) free;
288 gs->xmlMalloc = (xmlMallocFunc) malloc;
289 gs->xmlRealloc = (xmlReallocFunc) realloc;
290 gs->xmlMemStrdup = (xmlStrdupFunc) strdup;
291#endif
Daniel Veillardb8478642001-10-12 17:29:10 +0000292 gs->xmlGenericErrorContext = NULL;
293 gs->xmlGetWarningsDefaultValue = 1;
294 gs->xmlIndentTreeOutput = 0;
295 gs->xmlKeepBlanksDefaultValue = 1;
296 gs->xmlLineNumbersDefaultValue = 0;
297 gs->xmlLoadExtDtdDefaultValue = 0;
298 gs->xmlParserDebugEntities = 0;
299 gs->xmlParserVersion = LIBXML_VERSION_STRING;
300 gs->xmlPedanticParserDefaultValue = 0;
301 gs->xmlSaveNoEmptyTags = 0;
302 gs->xmlSubstituteEntitiesDefaultValue = 0;
303}
304
Daniel Veillarda4617b82001-11-04 20:19:12 +0000305#ifdef LIBXML_DOCB_ENABLED
Daniel Veillardb8478642001-10-12 17:29:10 +0000306extern xmlSAXHandler docbDefaultSAXHandler;
307#undef docbDefaultSAXHandler
308xmlSAXHandler *
309__docbDefaultSAXHandler(void) {
310 if (IS_MAIN_THREAD)
311 return (&docbDefaultSAXHandler);
312 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000313 return (&xmlGetGlobalState()->docbDefaultSAXHandler);
Daniel Veillardb8478642001-10-12 17:29:10 +0000314}
Daniel Veillarda4617b82001-11-04 20:19:12 +0000315#endif
Daniel Veillardb8478642001-10-12 17:29:10 +0000316
Daniel Veillarda4617b82001-11-04 20:19:12 +0000317#ifdef LIBXML_HTML_ENABLED
Daniel Veillardb8478642001-10-12 17:29:10 +0000318extern xmlSAXHandler htmlDefaultSAXHandler;
319#undef htmlDefaultSAXHandler
320xmlSAXHandler *
321__htmlDefaultSAXHandler(void) {
322 if (IS_MAIN_THREAD)
323 return (&htmlDefaultSAXHandler);
324 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000325 return (&xmlGetGlobalState()->htmlDefaultSAXHandler);
Daniel Veillardb8478642001-10-12 17:29:10 +0000326}
Daniel Veillarda4617b82001-11-04 20:19:12 +0000327#endif
328
329/*
330 * Everything starting from the line below is
331 * Automatically generated by build_glob.py.
332 * Do not modify the previous line.
333 */
334
Daniel Veillardb8478642001-10-12 17:29:10 +0000335
336extern int oldXMLWDcompatibility;
337#undef oldXMLWDcompatibility
338int *
339__oldXMLWDcompatibility(void) {
340 if (IS_MAIN_THREAD)
341 return (&oldXMLWDcompatibility);
342 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000343 return (&xmlGetGlobalState()->oldXMLWDcompatibility);
Daniel Veillardb8478642001-10-12 17:29:10 +0000344}
345
346extern xmlBufferAllocationScheme xmlBufferAllocScheme;
347#undef xmlBufferAllocScheme
348xmlBufferAllocationScheme *
349__xmlBufferAllocScheme(void) {
350 if (IS_MAIN_THREAD)
351 return (&xmlBufferAllocScheme);
352 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000353 return (&xmlGetGlobalState()->xmlBufferAllocScheme);
Daniel Veillardb8478642001-10-12 17:29:10 +0000354}
355
356extern int xmlDefaultBufferSize;
357#undef xmlDefaultBufferSize
358int *
359__xmlDefaultBufferSize(void) {
360 if (IS_MAIN_THREAD)
361 return (&xmlDefaultBufferSize);
362 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000363 return (&xmlGetGlobalState()->xmlDefaultBufferSize);
Daniel Veillardb8478642001-10-12 17:29:10 +0000364}
365
366extern xmlSAXHandler xmlDefaultSAXHandler;
367#undef xmlDefaultSAXHandler
368xmlSAXHandler *
369__xmlDefaultSAXHandler(void) {
370 if (IS_MAIN_THREAD)
371 return (&xmlDefaultSAXHandler);
372 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000373 return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
Daniel Veillardb8478642001-10-12 17:29:10 +0000374}
375
376extern xmlSAXLocator xmlDefaultSAXLocator;
377#undef xmlDefaultSAXLocator
378xmlSAXLocator *
379__xmlDefaultSAXLocator(void) {
380 if (IS_MAIN_THREAD)
381 return (&xmlDefaultSAXLocator);
382 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000383 return (&xmlGetGlobalState()->xmlDefaultSAXLocator);
Daniel Veillardb8478642001-10-12 17:29:10 +0000384}
385
386extern int xmlDoValidityCheckingDefaultValue;
387#undef xmlDoValidityCheckingDefaultValue
388int *
389__xmlDoValidityCheckingDefaultValue(void) {
390 if (IS_MAIN_THREAD)
391 return (&xmlDoValidityCheckingDefaultValue);
392 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000393 return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000394}
395
396extern xmlFreeFunc xmlFree;
397#undef xmlFree
398xmlFreeFunc *
399__xmlFree(void) {
400 if (IS_MAIN_THREAD)
401 return (&xmlFree);
402 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000403 return (&xmlGetGlobalState()->xmlFree);
Daniel Veillardb8478642001-10-12 17:29:10 +0000404}
405
406extern xmlGenericErrorFunc xmlGenericError;
407#undef xmlGenericError
408xmlGenericErrorFunc *
409__xmlGenericError(void) {
410 if (IS_MAIN_THREAD)
411 return (&xmlGenericError);
412 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000413 return (&xmlGetGlobalState()->xmlGenericError);
Daniel Veillardb8478642001-10-12 17:29:10 +0000414}
415
416extern void * xmlGenericErrorContext;
417#undef xmlGenericErrorContext
418void * *
419__xmlGenericErrorContext(void) {
420 if (IS_MAIN_THREAD)
421 return (&xmlGenericErrorContext);
422 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000423 return (&xmlGetGlobalState()->xmlGenericErrorContext);
Daniel Veillardb8478642001-10-12 17:29:10 +0000424}
425
426extern int xmlGetWarningsDefaultValue;
427#undef xmlGetWarningsDefaultValue
428int *
429__xmlGetWarningsDefaultValue(void) {
430 if (IS_MAIN_THREAD)
431 return (&xmlGetWarningsDefaultValue);
432 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000433 return (&xmlGetGlobalState()->xmlGetWarningsDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000434}
435
436extern int xmlIndentTreeOutput;
437#undef xmlIndentTreeOutput
438int *
439__xmlIndentTreeOutput(void) {
440 if (IS_MAIN_THREAD)
441 return (&xmlIndentTreeOutput);
442 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000443 return (&xmlGetGlobalState()->xmlIndentTreeOutput);
Daniel Veillardb8478642001-10-12 17:29:10 +0000444}
445
446extern int xmlKeepBlanksDefaultValue;
447#undef xmlKeepBlanksDefaultValue
448int *
449__xmlKeepBlanksDefaultValue(void) {
450 if (IS_MAIN_THREAD)
451 return (&xmlKeepBlanksDefaultValue);
452 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000453 return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000454}
455
456extern int xmlLineNumbersDefaultValue;
457#undef xmlLineNumbersDefaultValue
458int *
459__xmlLineNumbersDefaultValue(void) {
460 if (IS_MAIN_THREAD)
461 return (&xmlLineNumbersDefaultValue);
462 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000463 return (&xmlGetGlobalState()->xmlLineNumbersDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000464}
465
466extern int xmlLoadExtDtdDefaultValue;
467#undef xmlLoadExtDtdDefaultValue
468int *
469__xmlLoadExtDtdDefaultValue(void) {
470 if (IS_MAIN_THREAD)
471 return (&xmlLoadExtDtdDefaultValue);
472 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000473 return (&xmlGetGlobalState()->xmlLoadExtDtdDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000474}
475
476extern xmlMallocFunc xmlMalloc;
477#undef xmlMalloc
478xmlMallocFunc *
479__xmlMalloc(void) {
480 if (IS_MAIN_THREAD)
481 return (&xmlMalloc);
482 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000483 return (&xmlGetGlobalState()->xmlMalloc);
Daniel Veillardb8478642001-10-12 17:29:10 +0000484}
485
486extern xmlStrdupFunc xmlMemStrdup;
487#undef xmlMemStrdup
488xmlStrdupFunc *
489__xmlMemStrdup(void) {
490 if (IS_MAIN_THREAD)
491 return (&xmlMemStrdup);
492 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000493 return (&xmlGetGlobalState()->xmlMemStrdup);
Daniel Veillardb8478642001-10-12 17:29:10 +0000494}
495
496extern int xmlParserDebugEntities;
497#undef xmlParserDebugEntities
498int *
499__xmlParserDebugEntities(void) {
500 if (IS_MAIN_THREAD)
501 return (&xmlParserDebugEntities);
502 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000503 return (&xmlGetGlobalState()->xmlParserDebugEntities);
Daniel Veillardb8478642001-10-12 17:29:10 +0000504}
505
506extern const char * xmlParserVersion;
507#undef xmlParserVersion
508const char * *
509__xmlParserVersion(void) {
510 if (IS_MAIN_THREAD)
511 return (&xmlParserVersion);
512 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000513 return (&xmlGetGlobalState()->xmlParserVersion);
Daniel Veillardb8478642001-10-12 17:29:10 +0000514}
515
516extern int xmlPedanticParserDefaultValue;
517#undef xmlPedanticParserDefaultValue
518int *
519__xmlPedanticParserDefaultValue(void) {
520 if (IS_MAIN_THREAD)
521 return (&xmlPedanticParserDefaultValue);
522 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000523 return (&xmlGetGlobalState()->xmlPedanticParserDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000524}
525
526extern xmlReallocFunc xmlRealloc;
527#undef xmlRealloc
528xmlReallocFunc *
529__xmlRealloc(void) {
530 if (IS_MAIN_THREAD)
531 return (&xmlRealloc);
532 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000533 return (&xmlGetGlobalState()->xmlRealloc);
Daniel Veillardb8478642001-10-12 17:29:10 +0000534}
535
536extern int xmlSaveNoEmptyTags;
537#undef xmlSaveNoEmptyTags
538int *
539__xmlSaveNoEmptyTags(void) {
540 if (IS_MAIN_THREAD)
541 return (&xmlSaveNoEmptyTags);
542 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000543 return (&xmlGetGlobalState()->xmlSaveNoEmptyTags);
Daniel Veillardb8478642001-10-12 17:29:10 +0000544}
545
546extern int xmlSubstituteEntitiesDefaultValue;
547#undef xmlSubstituteEntitiesDefaultValue
548int *
549__xmlSubstituteEntitiesDefaultValue(void) {
550 if (IS_MAIN_THREAD)
551 return (&xmlSubstituteEntitiesDefaultValue);
552 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000553 return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000554}