blob: 811160f6e44a145fb9d8d3d0be3968facab1f3e2 [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
Daniel Veillard34ce8be2002-03-18 19:37:11 +000014#define IN_LIBXML
Daniel Veillardb8478642001-10-12 17:29:10 +000015#include "libxml.h"
16
Daniel Veillarde7090612001-10-13 12:18:28 +000017#ifdef HAVE_STDLIB_H
Jaka Mocnik77d19ae2001-10-13 12:06:09 +000018#include <stdlib.h>
Daniel Veillarde7090612001-10-13 12:18:28 +000019#endif
Jaka Mocnik77d19ae2001-10-13 12:06:09 +000020#include <string.h>
21
Daniel Veillard3c01b1d2001-10-17 15:58:35 +000022#include <libxml/globals.h>
Daniel Veillarde7090612001-10-13 12:18:28 +000023#include <libxml/xmlmemory.h>
Daniel Veillard781ac8b2003-05-15 22:11:36 +000024#include <libxml/threads.h>
Daniel Veillarde7090612001-10-13 12:18:28 +000025
Daniel Veillard3c01b1d2001-10-17 15:58:35 +000026/* #define DEBUG_GLOBALS */
27
Daniel Veillardb8478642001-10-12 17:29:10 +000028/*
29 * Helpful Macro
30 */
Daniel Veillard3c01b1d2001-10-17 15:58:35 +000031#ifdef LIBXML_THREAD_ENABLED
32#define IS_MAIN_THREAD (xmlIsMainThread())
Daniel Veillardb8478642001-10-12 17:29:10 +000033#else
34#define IS_MAIN_THREAD 1
35#endif
36
Daniel Veillard781ac8b2003-05-15 22:11:36 +000037/*
38 * Mutex to protect "ForNewThreads" variables
39 */
40static xmlMutexPtr xmlThrDefMutex = NULL;
41
42void xmlInitGlobals()
43{
44 xmlThrDefMutex = xmlNewMutex();
45}
46
47void xmlCleanupGlobals()
48{
Daniel Veillarddf101d82003-07-08 14:03:36 +000049 if (xmlThrDefMutex != NULL)
50 xmlFreeMutex(xmlThrDefMutex);
Daniel Veillard781ac8b2003-05-15 22:11:36 +000051}
52
Daniel Veillardb8478642001-10-12 17:29:10 +000053/************************************************************************
54 * *
55 * All the user accessible global variables of the library *
56 * *
57 ************************************************************************/
58
Daniel Veillardb8478642001-10-12 17:29:10 +000059/*
60 * Memory allocation routines
61 */
Daniel Veillard7216cfd2002-11-08 15:10:00 +000062#if defined(DEBUG_MEMORY_LOCATION) || defined(DEBUG_MEMORY)
Daniel Veillardd0463562001-10-13 09:15:48 +000063extern void xmlMemFree(void *ptr);
64extern void * xmlMemMalloc(size_t size);
65extern void * xmlMemRealloc(void *ptr,size_t size);
66extern char * xmlMemoryStrdup(const char *str);
67
Daniel Veillardb8478642001-10-12 17:29:10 +000068xmlFreeFunc xmlFree = (xmlFreeFunc) xmlMemFree;
69xmlMallocFunc xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
Daniel Veillard3c908dc2003-04-19 00:07:51 +000070xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
Daniel Veillardb8478642001-10-12 17:29:10 +000071xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
72xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
73#else
Daniel Veillard9d06d302002-01-22 18:15:52 +000074/**
75 * xmlFree:
76 * @mem: an already allocated block of memory
77 *
78 * The variable holding the libxml free() implementation
79 */
Daniel Veillardb8478642001-10-12 17:29:10 +000080xmlFreeFunc xmlFree = (xmlFreeFunc) free;
Daniel Veillard9d06d302002-01-22 18:15:52 +000081/**
82 * xmlMalloc:
83 * @size: the size requested in bytes
84 *
85 * The variable holding the libxml malloc() implementation
86 *
87 * Returns a pointer to the newly allocated block or NULL in case of error
88 */
Daniel Veillardb8478642001-10-12 17:29:10 +000089xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc;
Daniel Veillard9d06d302002-01-22 18:15:52 +000090/**
Daniel Veillard3c908dc2003-04-19 00:07:51 +000091 * xmlMallocAtomic:
92 * @size: the size requested in bytes
93 *
94 * The variable holding the libxml malloc() implementation for atomic
95 * data (i.e. blocks not containings pointers), useful when using a
96 * garbage collecting allocator.
97 *
98 * Returns a pointer to the newly allocated block or NULL in case of error
99 */
100xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) malloc;
101/**
Daniel Veillard9d06d302002-01-22 18:15:52 +0000102 * xmlRealloc:
103 * @mem: an already allocated block of memory
104 * @size: the new size requested in bytes
105 *
106 * The variable holding the libxml realloc() implementation
107 *
108 * Returns a pointer to the newly reallocated block or NULL in case of error
109 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000110xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000111/**
112 * xmlMemStrdup:
113 * @str: a zero terminated string
114 *
115 * The variable holding the libxml strdup() implementation
116 *
117 * Returns the copy of the string or NULL in case of error
118 */
Daniel Veillardb82c1662001-12-09 14:00:54 +0000119xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
Daniel Veillardb8478642001-10-12 17:29:10 +0000120#endif
121
Daniel Veillardd0463562001-10-13 09:15:48 +0000122#include <libxml/threads.h>
123#include <libxml/globals.h>
124#include <libxml/SAX.h>
125
126#undef docbDefaultSAXHandler
127#undef htmlDefaultSAXHandler
128#undef oldXMLWDcompatibility
129#undef xmlBufferAllocScheme
130#undef xmlDefaultBufferSize
131#undef xmlDefaultSAXHandler
132#undef xmlDefaultSAXLocator
133#undef xmlDoValidityCheckingDefaultValue
134#undef xmlGenericError
135#undef xmlGenericErrorContext
136#undef xmlGetWarningsDefaultValue
137#undef xmlIndentTreeOutput
Aleksey Sanin23002562002-05-24 07:18:40 +0000138#undef xmlTreeIndentString
Daniel Veillardd0463562001-10-13 09:15:48 +0000139#undef xmlKeepBlanksDefaultValue
140#undef xmlLineNumbersDefaultValue
141#undef xmlLoadExtDtdDefaultValue
142#undef xmlParserDebugEntities
143#undef xmlParserVersion
144#undef xmlPedanticParserDefaultValue
145#undef xmlSaveNoEmptyTags
146#undef xmlSubstituteEntitiesDefaultValue
Daniel Veillard8326e732003-01-07 00:19:07 +0000147#undef xmlRegisterNodeDefaultValue
148#undef xmlDeregisterNodeDefaultValue
Daniel Veillardd0463562001-10-13 09:15:48 +0000149
150#undef xmlFree
151#undef xmlMalloc
Daniel Veillard3c908dc2003-04-19 00:07:51 +0000152#undef xmlMallocAtomic
Daniel Veillardd0463562001-10-13 09:15:48 +0000153#undef xmlMemStrdup
154#undef xmlRealloc
155
Daniel Veillard9d06d302002-01-22 18:15:52 +0000156/**
157 * xmlParserVersion:
158 *
159 * Constant string describing the internal version of the library
160 */
Daniel Veillard3c01b1d2001-10-17 15:58:35 +0000161const char *xmlParserVersion = LIBXML_VERSION_STRING;
162
Daniel Veillard9d06d302002-01-22 18:15:52 +0000163/**
164 * xmlBufferAllocScheme:
165 *
166 * Global setting, default allocation policy for buffers, default is
167 * XML_BUFFER_ALLOC_EXACT
Daniel Veillardb8478642001-10-12 17:29:10 +0000168 */
169xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000170static xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef = XML_BUFFER_ALLOC_EXACT;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000171/**
172 * xmlDefaultBufferSize:
173 *
174 * Global setting, default buffer size. Default value is BASE_BUFFER_SIZE
175 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000176int xmlDefaultBufferSize = BASE_BUFFER_SIZE;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000177static int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE;
Daniel Veillardb8478642001-10-12 17:29:10 +0000178
179/*
180 * Parser defaults
181 */
Daniel Veillardd0463562001-10-13 09:15:48 +0000182
Daniel Veillard9d06d302002-01-22 18:15:52 +0000183/**
184 * oldXMLWDcompatibility:
185 *
186 * Global setting, DEPRECATED.
187 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000188int oldXMLWDcompatibility = 0; /* DEPRECATED */
Daniel Veillard9d06d302002-01-22 18:15:52 +0000189/**
190 * xmlParserDebugEntities:
191 *
192 * Global setting, asking the parser to print out debugging informations.
193 * while handling entities.
194 * Disabled by default
195 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000196int xmlParserDebugEntities = 0;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000197static int xmlParserDebugEntitiesThrDef = 0;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000198/**
199 * xmlDoValidityCheckingDefaultValue:
200 *
201 * Global setting, indicate that the parser should work in validating mode.
202 * Disabled by default.
203 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000204int xmlDoValidityCheckingDefaultValue = 0;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000205static int xmlDoValidityCheckingDefaultValueThrDef = 0;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000206/**
207 * xmlGetWarningsDefaultValue:
208 *
209 * Global setting, indicate that the parser should provide warnings.
210 * Activated by default.
211 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000212int xmlGetWarningsDefaultValue = 1;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000213static int xmlGetWarningsDefaultValueThrDef = 1;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000214/**
215 * xmlLoadExtDtdDefaultValue:
216 *
217 * Global setting, indicate that the parser should load DTD while not
218 * validating.
219 * Disabled by default.
220 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000221int xmlLoadExtDtdDefaultValue = 0;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000222static int xmlLoadExtDtdDefaultValueThrDef = 0;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000223/**
224 * xmlPedanticParserDefaultValue:
225 *
226 * Global setting, indicate that the parser be pedantic
227 * Disabled by default.
228 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000229int xmlPedanticParserDefaultValue = 0;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000230static int xmlPedanticParserDefaultValueThrDef = 0;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000231/**
232 * xmlLineNumbersDefaultValue:
233 *
234 * Global setting, indicate that the parser should store the line number
235 * in the content field of elements in the DOM tree.
236 * Disabled by default since this may not be safe for old classes of
237 * applicaton.
238 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000239int xmlLineNumbersDefaultValue = 0;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000240static int xmlLineNumbersDefaultValueThrDef = 0;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000241/**
242 * xmlKeepBlanksDefaultValue:
243 *
244 * Global setting, indicate that the parser should keep all blanks
245 * nodes found in the content
246 * Activated by default, this is actually needed to have the parser
247 * conformant to the XML Recommendation, however the option is kept
248 * for some applications since this was libxml1 default behaviour.
249 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000250int xmlKeepBlanksDefaultValue = 1;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000251static int xmlKeepBlanksDefaultValueThrDef = 1;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000252/**
253 * xmlSubstituteEntitiesDefaultValue:
254 *
255 * Global setting, indicate that the parser should not generate entity
256 * references but replace them with the actual content of the entity
257 * Disabled by default, this should be activated when using XPath since
258 * the XPath data model requires entities replacement and the XPath
259 * engine does not handle entities references transparently.
260 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000261int xmlSubstituteEntitiesDefaultValue = 0;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000262static int xmlSubstituteEntitiesDefaultValueThrDef = 0;
Daniel Veillardb8478642001-10-12 17:29:10 +0000263
Daniel Veillard5335dc52003-01-01 20:59:38 +0000264xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000265static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL;
Daniel Veillard5335dc52003-01-01 20:59:38 +0000266xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000267static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL;
Daniel Veillard5335dc52003-01-01 20:59:38 +0000268
Daniel Veillardb8478642001-10-12 17:29:10 +0000269/*
270 * Error handling
271 */
272
273/* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */
274/* Must initialize xmlGenericError in xmlInitParser */
Daniel Veillard635ef722001-10-29 11:48:19 +0000275void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
276 const char *msg,
277 ...);
Daniel Veillard9d06d302002-01-22 18:15:52 +0000278/**
279 * xmlGenericError:
280 *
281 * Global setting: function used for generic error callbacks
282 */
Daniel Veillard635ef722001-10-29 11:48:19 +0000283xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000284static xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
Daniel Veillard9d06d302002-01-22 18:15:52 +0000285/**
286 * xmlGenericErrorContext:
287 *
288 * Global setting passed to generic error callbacks
289 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000290void *xmlGenericErrorContext = NULL;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000291static void *xmlGenericErrorContextThrDef = NULL;
Daniel Veillardb8478642001-10-12 17:29:10 +0000292
293/*
294 * output defaults
295 */
Daniel Veillard9d06d302002-01-22 18:15:52 +0000296/**
297 * xmlIndentTreeOutput:
298 *
299 * Global setting, asking the serializer to indent the output tree by default
Aleksey Sanin23002562002-05-24 07:18:40 +0000300 * Enabled by default
Daniel Veillard9d06d302002-01-22 18:15:52 +0000301 */
Aleksey Sanin23002562002-05-24 07:18:40 +0000302int xmlIndentTreeOutput = 1;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000303static int xmlIndentTreeOutputThrDef = 1;
Aleksey Sanin23002562002-05-24 07:18:40 +0000304
305/**
306 * xmlTreeIndentString:
307 *
308 * The string used to do one-level indent. By default is equal to " " (two spaces)
309 */
310const char *xmlTreeIndentString = " ";
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000311static const char *xmlTreeIndentStringThrDef = " ";
Aleksey Sanin23002562002-05-24 07:18:40 +0000312
Daniel Veillard9d06d302002-01-22 18:15:52 +0000313/**
314 * xmlSaveNoEmptyTags:
315 *
316 * Global setting, asking the serializer to not output empty tags
317 * as <empty/> but <empty></empty>. those two forms are undistinguishable
318 * once parsed.
319 * Disabled by default
320 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000321int xmlSaveNoEmptyTags = 0;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000322int xmlSaveNoEmptyTagsThrDef = 0;
Daniel Veillardb8478642001-10-12 17:29:10 +0000323
Daniel Veillard9d06d302002-01-22 18:15:52 +0000324/**
325 * xmlDefaultSAXHandler:
326 *
Daniel Veillardb8478642001-10-12 17:29:10 +0000327 * Default handler for XML, builds the DOM tree
328 */
329xmlSAXHandler xmlDefaultSAXHandler = {
330 internalSubset,
331 isStandalone,
332 hasInternalSubset,
333 hasExternalSubset,
334 resolveEntity,
335 getEntity,
336 entityDecl,
337 notationDecl,
338 attributeDecl,
339 elementDecl,
340 unparsedEntityDecl,
341 setDocumentLocator,
342 startDocument,
343 endDocument,
344 startElement,
345 endElement,
346 reference,
347 characters,
348 characters,
349 processingInstruction,
350 comment,
351 xmlParserWarning,
352 xmlParserError,
353 xmlParserError,
354 getParameterEntity,
355 cdataBlock,
356 externalSubset,
357 0
358};
359
Daniel Veillard9d06d302002-01-22 18:15:52 +0000360/**
361 * xmlDefaultSAXLocator:
362 *
363 * The default SAX Locator
364 * { getPublicId, getSystemId, getLineNumber, getColumnNumber}
Daniel Veillardb8478642001-10-12 17:29:10 +0000365 */
Daniel Veillardb8478642001-10-12 17:29:10 +0000366xmlSAXLocator xmlDefaultSAXLocator = {
367 getPublicId, getSystemId, getLineNumber, getColumnNumber
368};
369
370#ifdef LIBXML_HTML_ENABLED
Daniel Veillard9d06d302002-01-22 18:15:52 +0000371/**
372 * htmlDefaultSAXHandler:
373 *
Daniel Veillardb8478642001-10-12 17:29:10 +0000374 * Default handler for HTML, builds the DOM tree
375 */
376xmlSAXHandler htmlDefaultSAXHandler = {
377 internalSubset,
378 NULL,
379 NULL,
380 NULL,
381 NULL,
382 getEntity,
383 NULL,
384 NULL,
385 NULL,
386 NULL,
387 NULL,
388 setDocumentLocator,
389 startDocument,
390 endDocument,
391 startElement,
392 endElement,
393 NULL,
394 characters,
395 ignorableWhitespace,
396 NULL,
397 comment,
398 xmlParserWarning,
399 xmlParserError,
400 xmlParserError,
401 getParameterEntity,
402 cdataBlock,
403 NULL,
404 0
405};
406#endif /* LIBXML_HTML_ENABLED */
407
408#ifdef LIBXML_DOCB_ENABLED
Daniel Veillard9d06d302002-01-22 18:15:52 +0000409/**
410 * docbDefaultSAXHandler:
411 *
Daniel Veillardb8478642001-10-12 17:29:10 +0000412 * Default handler for SGML DocBook, builds the DOM tree
413 */
414xmlSAXHandler docbDefaultSAXHandler = {
415 internalSubset,
416 isStandalone,
417 hasInternalSubset,
418 hasExternalSubset,
419 resolveEntity,
420 getEntity,
421 entityDecl,
422 NULL,
423 NULL,
424 NULL,
425 NULL,
426 setDocumentLocator,
427 startDocument,
428 endDocument,
429 startElement,
430 endElement,
431 reference,
432 characters,
433 ignorableWhitespace,
434 NULL,
435 comment,
436 xmlParserWarning,
437 xmlParserError,
438 xmlParserError,
439 getParameterEntity,
440 NULL,
441 NULL,
442 0
443};
444#endif /* LIBXML_DOCB_ENABLED */
445
446/**
447 * xmlInitializeGlobalState:
448 * @gs: a pointer to a newly allocated global state
449 *
450 * xmlInitializeGlobalState() initialize a global state with all the
451 * default values of the library.
452 */
453void
454xmlInitializeGlobalState(xmlGlobalStatePtr gs)
455{
Daniel Veillard3c01b1d2001-10-17 15:58:35 +0000456#ifdef DEBUG_GLOBALS
457 fprintf(stderr, "Initializing globals at %lu for thread %d\n",
458 (unsigned long) gs, xmlGetThreadId());
459#endif
460
Daniel Veillardb8478642001-10-12 17:29:10 +0000461 /*
Daniel Veillardcbaf3992001-12-31 16:16:02 +0000462 * Perform initialization as required by libxml
Daniel Veillardb8478642001-10-12 17:29:10 +0000463 */
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000464 xmlMutexLock(xmlThrDefMutex);
William M. Brack8b2c7f12002-11-22 05:07:29 +0000465
Daniel Veillarda4617b82001-11-04 20:19:12 +0000466#ifdef LIBXML_DOCB_ENABLED
Daniel Veillardb8478642001-10-12 17:29:10 +0000467 initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
Daniel Veillarda4617b82001-11-04 20:19:12 +0000468#endif
469#ifdef LIBXML_HTML_ENABLED
Daniel Veillardb8478642001-10-12 17:29:10 +0000470 inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
Daniel Veillarda4617b82001-11-04 20:19:12 +0000471#endif
Daniel Veillard3c01b1d2001-10-17 15:58:35 +0000472
Daniel Veillardb8478642001-10-12 17:29:10 +0000473 gs->oldXMLWDcompatibility = 0;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000474 gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
475 gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
Daniel Veillardb8478642001-10-12 17:29:10 +0000476 initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
477 gs->xmlDefaultSAXLocator.getPublicId = getPublicId;
478 gs->xmlDefaultSAXLocator.getSystemId = getSystemId;
479 gs->xmlDefaultSAXLocator.getLineNumber = getLineNumber;
480 gs->xmlDefaultSAXLocator.getColumnNumber = getColumnNumber;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000481 gs->xmlDoValidityCheckingDefaultValue =
482 xmlDoValidityCheckingDefaultValueThrDef;
Daniel Veillardb8478642001-10-12 17:29:10 +0000483#if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
484 gs->xmlFree = (xmlFreeFunc) xmlMemFree;
485 gs->xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
Daniel Veillard3c908dc2003-04-19 00:07:51 +0000486 gs->xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
Daniel Veillardb8478642001-10-12 17:29:10 +0000487 gs->xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
488 gs->xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
489#else
490 gs->xmlFree = (xmlFreeFunc) free;
491 gs->xmlMalloc = (xmlMallocFunc) malloc;
Daniel Veillard3c908dc2003-04-19 00:07:51 +0000492 gs->xmlMallocAtomic = (xmlMallocFunc) malloc;
Daniel Veillardb8478642001-10-12 17:29:10 +0000493 gs->xmlRealloc = (xmlReallocFunc) realloc;
Daniel Veillard572577e2002-01-18 16:23:55 +0000494 gs->xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
Daniel Veillardb8478642001-10-12 17:29:10 +0000495#endif
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000496 gs->xmlGetWarningsDefaultValue = xmlGetWarningsDefaultValueThrDef;
497 gs->xmlIndentTreeOutput = xmlIndentTreeOutputThrDef;
498 gs->xmlTreeIndentString = xmlTreeIndentStringThrDef;
499 gs->xmlKeepBlanksDefaultValue = xmlKeepBlanksDefaultValueThrDef;
500 gs->xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef;
501 gs->xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef;
502 gs->xmlParserDebugEntities = xmlParserDebugEntitiesThrDef;
Daniel Veillardb8478642001-10-12 17:29:10 +0000503 gs->xmlParserVersion = LIBXML_VERSION_STRING;
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000504 gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
505 gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
506 gs->xmlSubstituteEntitiesDefaultValue =
507 xmlSubstituteEntitiesDefaultValueThrDef;
Daniel Veillard5335dc52003-01-01 20:59:38 +0000508
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000509 gs->xmlGenericError = xmlGenericErrorThrDef;
510 gs->xmlGenericErrorContext = xmlGenericErrorContextThrDef;
511 gs->xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef;
512 gs->xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef;
513
514 xmlMutexUnlock(xmlThrDefMutex);
515}
516
517void
518xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
519 xmlMutexLock(xmlThrDefMutex);
520 xmlGenericErrorContextThrDef = ctx;
521 if (handler != NULL)
522 xmlGenericErrorThrDef = handler;
523 else
524 xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
525 xmlMutexUnlock(xmlThrDefMutex);
Daniel Veillardb8478642001-10-12 17:29:10 +0000526}
527
Daniel Veillard5335dc52003-01-01 20:59:38 +0000528/**
Daniel Veillard7b4b2f92003-01-06 13:11:20 +0000529 * xmlRegisterNodeDefault:
Daniel Veillard5335dc52003-01-01 20:59:38 +0000530 * @func: function pointer to the new RegisterNodeFunc
531 *
Daniel Veillard1703c5f2003-02-10 14:28:44 +0000532 * Registers a callback for node creation
533 *
534 * Returns the old value of the registration function
Daniel Veillard5335dc52003-01-01 20:59:38 +0000535 */
536xmlRegisterNodeFunc
537xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
538{
539 xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue;
540
Daniel Veillarda880b122003-04-21 21:36:41 +0000541 __xmlRegisterCallbacks = 1;
Daniel Veillard5335dc52003-01-01 20:59:38 +0000542 xmlRegisterNodeDefaultValue = func;
543 return(old);
544}
545
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000546xmlRegisterNodeFunc
547xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
548{
549 xmlRegisterNodeFunc old;
550
551 xmlMutexLock(xmlThrDefMutex);
552 old = xmlRegisterNodeDefaultValueThrDef;
553
554 __xmlRegisterCallbacks = 1;
555 xmlRegisterNodeDefaultValueThrDef = func;
556 xmlMutexUnlock(xmlThrDefMutex);
557
558 return(old);
559}
560
Daniel Veillard5335dc52003-01-01 20:59:38 +0000561/**
Daniel Veillard7b4b2f92003-01-06 13:11:20 +0000562 * xmlDeregisterNodeDefault:
Daniel Veillard5335dc52003-01-01 20:59:38 +0000563 * @func: function pointer to the new DeregisterNodeFunc
564 *
Daniel Veillard1703c5f2003-02-10 14:28:44 +0000565 * Registers a callback for node destruction
566 *
Daniel Veillard7b4b2f92003-01-06 13:11:20 +0000567 * Returns the previous value of the deregistration function
Daniel Veillard5335dc52003-01-01 20:59:38 +0000568 */
569xmlDeregisterNodeFunc
570xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
571{
572 xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue;
573
Daniel Veillarda880b122003-04-21 21:36:41 +0000574 __xmlRegisterCallbacks = 1;
Daniel Veillard5335dc52003-01-01 20:59:38 +0000575 xmlDeregisterNodeDefaultValue = func;
576 return(old);
577}
578
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000579xmlDeregisterNodeFunc
580xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
581{
582 xmlDeregisterNodeFunc old;
583
584 xmlMutexLock(xmlThrDefMutex);
585 old = xmlDeregisterNodeDefaultValueThrDef;
586
587 __xmlRegisterCallbacks = 1;
588 xmlDeregisterNodeDefaultValueThrDef = func;
589 xmlMutexUnlock(xmlThrDefMutex);
590
591 return(old);
592}
593
Daniel Veillard5335dc52003-01-01 20:59:38 +0000594
Daniel Veillarda4617b82001-11-04 20:19:12 +0000595#ifdef LIBXML_DOCB_ENABLED
Daniel Veillardb8478642001-10-12 17:29:10 +0000596#undef docbDefaultSAXHandler
597xmlSAXHandler *
598__docbDefaultSAXHandler(void) {
599 if (IS_MAIN_THREAD)
600 return (&docbDefaultSAXHandler);
601 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000602 return (&xmlGetGlobalState()->docbDefaultSAXHandler);
Daniel Veillardb8478642001-10-12 17:29:10 +0000603}
Daniel Veillarda4617b82001-11-04 20:19:12 +0000604#endif
Daniel Veillardb8478642001-10-12 17:29:10 +0000605
Daniel Veillarda4617b82001-11-04 20:19:12 +0000606#ifdef LIBXML_HTML_ENABLED
Daniel Veillardb8478642001-10-12 17:29:10 +0000607#undef htmlDefaultSAXHandler
608xmlSAXHandler *
609__htmlDefaultSAXHandler(void) {
610 if (IS_MAIN_THREAD)
611 return (&htmlDefaultSAXHandler);
612 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000613 return (&xmlGetGlobalState()->htmlDefaultSAXHandler);
Daniel Veillardb8478642001-10-12 17:29:10 +0000614}
Daniel Veillarda4617b82001-11-04 20:19:12 +0000615#endif
616
617/*
618 * Everything starting from the line below is
619 * Automatically generated by build_glob.py.
620 * Do not modify the previous line.
621 */
622
Daniel Veillardb8478642001-10-12 17:29:10 +0000623
Daniel Veillardb8478642001-10-12 17:29:10 +0000624#undef oldXMLWDcompatibility
625int *
626__oldXMLWDcompatibility(void) {
627 if (IS_MAIN_THREAD)
628 return (&oldXMLWDcompatibility);
629 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000630 return (&xmlGetGlobalState()->oldXMLWDcompatibility);
Daniel Veillardb8478642001-10-12 17:29:10 +0000631}
632
Daniel Veillardb8478642001-10-12 17:29:10 +0000633#undef xmlBufferAllocScheme
634xmlBufferAllocationScheme *
635__xmlBufferAllocScheme(void) {
636 if (IS_MAIN_THREAD)
637 return (&xmlBufferAllocScheme);
638 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000639 return (&xmlGetGlobalState()->xmlBufferAllocScheme);
Daniel Veillardb8478642001-10-12 17:29:10 +0000640}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000641xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v) {
642 xmlBufferAllocationScheme ret;
643 xmlMutexLock(xmlThrDefMutex);
644 ret = xmlBufferAllocSchemeThrDef;
645 xmlBufferAllocSchemeThrDef = v;
646 xmlMutexUnlock(xmlThrDefMutex);
647 return ret;
648}
Daniel Veillardb8478642001-10-12 17:29:10 +0000649
Daniel Veillardb8478642001-10-12 17:29:10 +0000650#undef xmlDefaultBufferSize
651int *
652__xmlDefaultBufferSize(void) {
653 if (IS_MAIN_THREAD)
654 return (&xmlDefaultBufferSize);
655 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000656 return (&xmlGetGlobalState()->xmlDefaultBufferSize);
Daniel Veillardb8478642001-10-12 17:29:10 +0000657}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000658int xmlThrDefDefaultBufferSize(int v) {
659 int ret;
660 xmlMutexLock(xmlThrDefMutex);
661 ret = xmlDefaultBufferSizeThrDef;
662 xmlDefaultBufferSizeThrDef = v;
663 xmlMutexUnlock(xmlThrDefMutex);
664 return ret;
665}
Daniel Veillardb8478642001-10-12 17:29:10 +0000666
Daniel Veillardb8478642001-10-12 17:29:10 +0000667#undef xmlDefaultSAXHandler
668xmlSAXHandler *
669__xmlDefaultSAXHandler(void) {
670 if (IS_MAIN_THREAD)
671 return (&xmlDefaultSAXHandler);
672 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000673 return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
Daniel Veillardb8478642001-10-12 17:29:10 +0000674}
675
Daniel Veillardb8478642001-10-12 17:29:10 +0000676#undef xmlDefaultSAXLocator
677xmlSAXLocator *
678__xmlDefaultSAXLocator(void) {
679 if (IS_MAIN_THREAD)
680 return (&xmlDefaultSAXLocator);
681 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000682 return (&xmlGetGlobalState()->xmlDefaultSAXLocator);
Daniel Veillardb8478642001-10-12 17:29:10 +0000683}
684
Daniel Veillardb8478642001-10-12 17:29:10 +0000685#undef xmlDoValidityCheckingDefaultValue
686int *
687__xmlDoValidityCheckingDefaultValue(void) {
688 if (IS_MAIN_THREAD)
689 return (&xmlDoValidityCheckingDefaultValue);
690 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000691 return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000692}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000693int xmlThrDefDoValidityCheckingDefaultValue(int v) {
694 int ret;
695 xmlMutexLock(xmlThrDefMutex);
696 ret = xmlDoValidityCheckingDefaultValueThrDef;
697 xmlDoValidityCheckingDefaultValueThrDef = v;
698 xmlMutexUnlock(xmlThrDefMutex);
699 return ret;
700}
Daniel Veillardb8478642001-10-12 17:29:10 +0000701
Daniel Veillardb8478642001-10-12 17:29:10 +0000702#undef xmlGenericError
703xmlGenericErrorFunc *
704__xmlGenericError(void) {
705 if (IS_MAIN_THREAD)
706 return (&xmlGenericError);
707 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000708 return (&xmlGetGlobalState()->xmlGenericError);
Daniel Veillardb8478642001-10-12 17:29:10 +0000709}
710
Daniel Veillardb8478642001-10-12 17:29:10 +0000711#undef xmlGenericErrorContext
712void * *
713__xmlGenericErrorContext(void) {
714 if (IS_MAIN_THREAD)
715 return (&xmlGenericErrorContext);
716 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000717 return (&xmlGetGlobalState()->xmlGenericErrorContext);
Daniel Veillardb8478642001-10-12 17:29:10 +0000718}
719
Daniel Veillardb8478642001-10-12 17:29:10 +0000720#undef xmlGetWarningsDefaultValue
721int *
722__xmlGetWarningsDefaultValue(void) {
723 if (IS_MAIN_THREAD)
724 return (&xmlGetWarningsDefaultValue);
725 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000726 return (&xmlGetGlobalState()->xmlGetWarningsDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000727}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000728int xmlThrDefGetWarningsDefaultValue(int v) {
729 int ret;
730 xmlMutexLock(xmlThrDefMutex);
731 ret = xmlGetWarningsDefaultValueThrDef;
732 xmlGetWarningsDefaultValueThrDef = v;
733 xmlMutexUnlock(xmlThrDefMutex);
734 return ret;
735}
Daniel Veillardb8478642001-10-12 17:29:10 +0000736
Daniel Veillardb8478642001-10-12 17:29:10 +0000737#undef xmlIndentTreeOutput
738int *
739__xmlIndentTreeOutput(void) {
740 if (IS_MAIN_THREAD)
741 return (&xmlIndentTreeOutput);
742 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000743 return (&xmlGetGlobalState()->xmlIndentTreeOutput);
Daniel Veillardb8478642001-10-12 17:29:10 +0000744}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000745int xmlThrDefIndentTreeOutput(int v) {
746 int ret;
747 xmlMutexLock(xmlThrDefMutex);
748 ret = xmlIndentTreeOutputThrDef;
749 xmlIndentTreeOutputThrDef = v;
750 xmlMutexUnlock(xmlThrDefMutex);
751 return ret;
752}
Daniel Veillardb8478642001-10-12 17:29:10 +0000753
Aleksey Sanin23002562002-05-24 07:18:40 +0000754#undef xmlTreeIndentString
755const char * *
756__xmlTreeIndentString(void) {
757 if (IS_MAIN_THREAD)
758 return (&xmlTreeIndentString);
759 else
760 return (&xmlGetGlobalState()->xmlTreeIndentString);
761}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000762const char * xmlThrDefTreeIndentString(const char * v) {
763 const char * ret;
764 xmlMutexLock(xmlThrDefMutex);
765 ret = xmlTreeIndentStringThrDef;
766 xmlTreeIndentStringThrDef = v;
767 xmlMutexUnlock(xmlThrDefMutex);
768 return ret;
769}
Aleksey Sanin23002562002-05-24 07:18:40 +0000770
Daniel Veillardb8478642001-10-12 17:29:10 +0000771#undef xmlKeepBlanksDefaultValue
772int *
773__xmlKeepBlanksDefaultValue(void) {
774 if (IS_MAIN_THREAD)
775 return (&xmlKeepBlanksDefaultValue);
776 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000777 return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000778}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000779int xmlThrDefKeepBlanksDefaultValue(int v) {
780 int ret;
781 xmlMutexLock(xmlThrDefMutex);
782 ret = xmlKeepBlanksDefaultValueThrDef;
783 xmlKeepBlanksDefaultValueThrDef = v;
784 xmlMutexUnlock(xmlThrDefMutex);
785 return ret;
786}
Daniel Veillardb8478642001-10-12 17:29:10 +0000787
Daniel Veillardb8478642001-10-12 17:29:10 +0000788#undef xmlLineNumbersDefaultValue
789int *
790__xmlLineNumbersDefaultValue(void) {
791 if (IS_MAIN_THREAD)
792 return (&xmlLineNumbersDefaultValue);
793 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000794 return (&xmlGetGlobalState()->xmlLineNumbersDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000795}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000796int xmlThrDefLineNumbersDefaultValue(int v) {
797 int ret;
798 xmlMutexLock(xmlThrDefMutex);
799 ret = xmlLineNumbersDefaultValueThrDef;
800 xmlLineNumbersDefaultValueThrDef = v;
801 xmlMutexUnlock(xmlThrDefMutex);
802 return ret;
803}
Daniel Veillardb8478642001-10-12 17:29:10 +0000804
Daniel Veillardb8478642001-10-12 17:29:10 +0000805#undef xmlLoadExtDtdDefaultValue
806int *
807__xmlLoadExtDtdDefaultValue(void) {
808 if (IS_MAIN_THREAD)
809 return (&xmlLoadExtDtdDefaultValue);
810 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000811 return (&xmlGetGlobalState()->xmlLoadExtDtdDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000812}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000813int xmlThrDefLoadExtDtdDefaultValue(int v) {
814 int ret;
815 xmlMutexLock(xmlThrDefMutex);
816 ret = xmlLoadExtDtdDefaultValueThrDef;
817 xmlLoadExtDtdDefaultValueThrDef = v;
818 xmlMutexUnlock(xmlThrDefMutex);
819 return ret;
820}
Daniel Veillardb8478642001-10-12 17:29:10 +0000821
Daniel Veillardb8478642001-10-12 17:29:10 +0000822#undef xmlParserDebugEntities
823int *
824__xmlParserDebugEntities(void) {
825 if (IS_MAIN_THREAD)
826 return (&xmlParserDebugEntities);
827 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000828 return (&xmlGetGlobalState()->xmlParserDebugEntities);
Daniel Veillardb8478642001-10-12 17:29:10 +0000829}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000830int xmlThrDefParserDebugEntities(int v) {
831 int ret;
832 xmlMutexLock(xmlThrDefMutex);
833 ret = xmlParserDebugEntitiesThrDef;
834 xmlParserDebugEntitiesThrDef = v;
835 xmlMutexUnlock(xmlThrDefMutex);
836 return ret;
837}
Daniel Veillardb8478642001-10-12 17:29:10 +0000838
Daniel Veillardb8478642001-10-12 17:29:10 +0000839#undef xmlParserVersion
840const char * *
841__xmlParserVersion(void) {
842 if (IS_MAIN_THREAD)
843 return (&xmlParserVersion);
844 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000845 return (&xmlGetGlobalState()->xmlParserVersion);
Daniel Veillardb8478642001-10-12 17:29:10 +0000846}
847
Daniel Veillardb8478642001-10-12 17:29:10 +0000848#undef xmlPedanticParserDefaultValue
849int *
850__xmlPedanticParserDefaultValue(void) {
851 if (IS_MAIN_THREAD)
852 return (&xmlPedanticParserDefaultValue);
853 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000854 return (&xmlGetGlobalState()->xmlPedanticParserDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000855}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000856int xmlThrDefPedanticParserDefaultValue(int v) {
857 int ret;
858 xmlMutexLock(xmlThrDefMutex);
859 ret = xmlPedanticParserDefaultValueThrDef;
860 xmlPedanticParserDefaultValueThrDef = v;
861 xmlMutexUnlock(xmlThrDefMutex);
862 return ret;
863}
Daniel Veillardb8478642001-10-12 17:29:10 +0000864
Daniel Veillardb8478642001-10-12 17:29:10 +0000865#undef xmlSaveNoEmptyTags
866int *
867__xmlSaveNoEmptyTags(void) {
868 if (IS_MAIN_THREAD)
869 return (&xmlSaveNoEmptyTags);
870 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000871 return (&xmlGetGlobalState()->xmlSaveNoEmptyTags);
Daniel Veillardb8478642001-10-12 17:29:10 +0000872}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000873int xmlThrDefSaveNoEmptyTags(int v) {
874 int ret;
875 xmlMutexLock(xmlThrDefMutex);
876 ret = xmlSaveNoEmptyTagsThrDef;
877 xmlSaveNoEmptyTagsThrDef = v;
878 xmlMutexUnlock(xmlThrDefMutex);
879 return ret;
880}
Daniel Veillardb8478642001-10-12 17:29:10 +0000881
Daniel Veillardb8478642001-10-12 17:29:10 +0000882#undef xmlSubstituteEntitiesDefaultValue
883int *
884__xmlSubstituteEntitiesDefaultValue(void) {
885 if (IS_MAIN_THREAD)
886 return (&xmlSubstituteEntitiesDefaultValue);
887 else
Daniel Veillardd0463562001-10-13 09:15:48 +0000888 return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultValue);
Daniel Veillardb8478642001-10-12 17:29:10 +0000889}
Daniel Veillard781ac8b2003-05-15 22:11:36 +0000890int xmlThrDefSubstituteEntitiesDefaultValue(int v) {
891 int ret;
892 xmlMutexLock(xmlThrDefMutex);
893 ret = xmlSubstituteEntitiesDefaultValueThrDef;
894 xmlSubstituteEntitiesDefaultValueThrDef = v;
895 xmlMutexUnlock(xmlThrDefMutex);
896 return ret;
897}
Daniel Veillard5335dc52003-01-01 20:59:38 +0000898
899#undef xmlRegisterNodeDefaultValue
900xmlRegisterNodeFunc *
901__xmlRegisterNodeDefaultValue(void) {
902 if (IS_MAIN_THREAD)
903 return (&xmlRegisterNodeDefaultValue);
904 else
905 return (&xmlGetGlobalState()->xmlRegisterNodeDefaultValue);
906}
907
908#undef xmlDeregisterNodeDefaultValue
909xmlDeregisterNodeFunc *
910__xmlDeregisterNodeDefaultValue(void) {
911 if (IS_MAIN_THREAD)
912 return (&xmlDeregisterNodeDefaultValue);
913 else
914 return (&xmlGetGlobalState()->xmlDeregisterNodeDefaultValue);
915}