2 * globals.c: definition and handling of the set of global variables
5 * The bottom of this file is automatically generated by build_glob.py
6 * based on the description file global.data
8 * See Copyright for the status of this software.
10 * Gary Pennington <Gary.Pennington@uk.sun.com>
22 #include <libxml/globals.h>
23 #include <libxml/xmlmemory.h>
24 #include <libxml/threads.h>
26 /* #define DEBUG_GLOBALS */
31 #ifdef LIBXML_THREAD_ENABLED
32 #define IS_MAIN_THREAD (xmlIsMainThread())
34 #define IS_MAIN_THREAD 1
38 * Mutex to protect "ForNewThreads" variables
40 static xmlMutexPtr xmlThrDefMutex = NULL;
44 xmlThrDefMutex = xmlNewMutex();
47 void xmlCleanupGlobals()
49 if (xmlThrDefMutex != NULL) {
50 xmlFreeMutex(xmlThrDefMutex);
51 xmlThrDefMutex = NULL;
55 /************************************************************************
57 * All the user accessible global variables of the library *
59 ************************************************************************/
62 * Memory allocation routines
64 #if defined(DEBUG_MEMORY_LOCATION) || defined(DEBUG_MEMORY)
65 #ifndef _DEBUG_MEMORY_ALLOC_
66 extern void xmlMemFree(void *ptr);
67 extern void * xmlMemMalloc(size_t size);
68 extern void * xmlMemRealloc(void *ptr,size_t size);
69 extern char * xmlMemoryStrdup(const char *str);
72 xmlFreeFunc xmlFree = (xmlFreeFunc) xmlMemFree;
73 xmlMallocFunc xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
74 xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
75 xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
76 xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
80 * @mem: an already allocated block of memory
82 * The variable holding the libxml free() implementation
84 xmlFreeFunc xmlFree = (xmlFreeFunc) free;
87 * @size: the size requested in bytes
89 * The variable holding the libxml malloc() implementation
91 * Returns a pointer to the newly allocated block or NULL in case of error
93 xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc;
96 * @size: the size requested in bytes
98 * The variable holding the libxml malloc() implementation for atomic
99 * data (i.e. blocks not containings pointers), useful when using a
100 * garbage collecting allocator.
102 * Returns a pointer to the newly allocated block or NULL in case of error
104 xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) malloc;
107 * @mem: an already allocated block of memory
108 * @size: the new size requested in bytes
110 * The variable holding the libxml realloc() implementation
112 * Returns a pointer to the newly reallocated block or NULL in case of error
114 xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc;
117 * @str: a zero terminated string
119 * The variable holding the libxml strdup() implementation
121 * Returns the copy of the string or NULL in case of error
123 xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
126 #include <libxml/threads.h>
127 #include <libxml/globals.h>
128 #include <libxml/SAX.h>
130 #undef docbDefaultSAXHandler
131 #undef htmlDefaultSAXHandler
132 #undef oldXMLWDcompatibility
133 #undef xmlBufferAllocScheme
134 #undef xmlDefaultBufferSize
135 #undef xmlDefaultSAXHandler
136 #undef xmlDefaultSAXLocator
137 #undef xmlDoValidityCheckingDefaultValue
138 #undef xmlGenericError
139 #undef xmlGenericErrorContext
140 #undef xmlGetWarningsDefaultValue
141 #undef xmlIndentTreeOutput
142 #undef xmlTreeIndentString
143 #undef xmlKeepBlanksDefaultValue
144 #undef xmlLineNumbersDefaultValue
145 #undef xmlLoadExtDtdDefaultValue
146 #undef xmlParserDebugEntities
147 #undef xmlParserVersion
148 #undef xmlPedanticParserDefaultValue
149 #undef xmlSaveNoEmptyTags
150 #undef xmlSubstituteEntitiesDefaultValue
151 #undef xmlRegisterNodeDefaultValue
152 #undef xmlDeregisterNodeDefaultValue
156 #undef xmlMallocAtomic
163 * Constant string describing the internal version of the library
165 const char *xmlParserVersion = LIBXML_VERSION_STRING;
168 * xmlBufferAllocScheme:
170 * Global setting, default allocation policy for buffers, default is
171 * XML_BUFFER_ALLOC_EXACT
173 xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT;
174 static xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef = XML_BUFFER_ALLOC_EXACT;
176 * xmlDefaultBufferSize:
178 * Global setting, default buffer size. Default value is BASE_BUFFER_SIZE
180 int xmlDefaultBufferSize = BASE_BUFFER_SIZE;
181 static int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE;
188 * oldXMLWDcompatibility:
190 * Global setting, DEPRECATED.
192 int oldXMLWDcompatibility = 0; /* DEPRECATED */
194 * xmlParserDebugEntities:
196 * Global setting, asking the parser to print out debugging informations.
197 * while handling entities.
198 * Disabled by default
200 int xmlParserDebugEntities = 0;
201 static int xmlParserDebugEntitiesThrDef = 0;
203 * xmlDoValidityCheckingDefaultValue:
205 * Global setting, indicate that the parser should work in validating mode.
206 * Disabled by default.
208 int xmlDoValidityCheckingDefaultValue = 0;
209 static int xmlDoValidityCheckingDefaultValueThrDef = 0;
211 * xmlGetWarningsDefaultValue:
213 * Global setting, indicate that the parser should provide warnings.
214 * Activated by default.
216 int xmlGetWarningsDefaultValue = 1;
217 static int xmlGetWarningsDefaultValueThrDef = 1;
219 * xmlLoadExtDtdDefaultValue:
221 * Global setting, indicate that the parser should load DTD while not
223 * Disabled by default.
225 int xmlLoadExtDtdDefaultValue = 0;
226 static int xmlLoadExtDtdDefaultValueThrDef = 0;
228 * xmlPedanticParserDefaultValue:
230 * Global setting, indicate that the parser be pedantic
231 * Disabled by default.
233 int xmlPedanticParserDefaultValue = 0;
234 static int xmlPedanticParserDefaultValueThrDef = 0;
236 * xmlLineNumbersDefaultValue:
238 * Global setting, indicate that the parser should store the line number
239 * in the content field of elements in the DOM tree.
240 * Disabled by default since this may not be safe for old classes of
243 int xmlLineNumbersDefaultValue = 0;
244 static int xmlLineNumbersDefaultValueThrDef = 0;
246 * xmlKeepBlanksDefaultValue:
248 * Global setting, indicate that the parser should keep all blanks
249 * nodes found in the content
250 * Activated by default, this is actually needed to have the parser
251 * conformant to the XML Recommendation, however the option is kept
252 * for some applications since this was libxml1 default behaviour.
254 int xmlKeepBlanksDefaultValue = 1;
255 static int xmlKeepBlanksDefaultValueThrDef = 1;
257 * xmlSubstituteEntitiesDefaultValue:
259 * Global setting, indicate that the parser should not generate entity
260 * references but replace them with the actual content of the entity
261 * Disabled by default, this should be activated when using XPath since
262 * the XPath data model requires entities replacement and the XPath
263 * engine does not handle entities references transparently.
265 int xmlSubstituteEntitiesDefaultValue = 0;
266 static int xmlSubstituteEntitiesDefaultValueThrDef = 0;
268 xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL;
269 static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL;
270 xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL;
271 static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL;
277 /* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */
278 /* Must initialize xmlGenericError in xmlInitParser */
279 void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
285 * Global setting: function used for generic error callbacks
287 xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc;
288 static xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
290 * xmlGenericErrorContext:
292 * Global setting passed to generic error callbacks
294 void *xmlGenericErrorContext = NULL;
295 static void *xmlGenericErrorContextThrDef = NULL;
301 * xmlIndentTreeOutput:
303 * Global setting, asking the serializer to indent the output tree by default
306 int xmlIndentTreeOutput = 1;
307 static int xmlIndentTreeOutputThrDef = 1;
310 * xmlTreeIndentString:
312 * The string used to do one-level indent. By default is equal to " " (two spaces)
314 const char *xmlTreeIndentString = " ";
315 static const char *xmlTreeIndentStringThrDef = " ";
318 * xmlSaveNoEmptyTags:
320 * Global setting, asking the serializer to not output empty tags
321 * as <empty/> but <empty></empty>. those two forms are undistinguishable
323 * Disabled by default
325 int xmlSaveNoEmptyTags = 0;
326 int xmlSaveNoEmptyTagsThrDef = 0;
329 * xmlDefaultSAXHandler:
331 * Default handler for XML, builds the DOM tree
333 xmlSAXHandler xmlDefaultSAXHandler = {
353 processingInstruction,
365 * xmlDefaultSAXLocator:
367 * The default SAX Locator
368 * { getPublicId, getSystemId, getLineNumber, getColumnNumber}
370 xmlSAXLocator xmlDefaultSAXLocator = {
371 getPublicId, getSystemId, getLineNumber, getColumnNumber
374 #ifdef LIBXML_HTML_ENABLED
376 * htmlDefaultSAXHandler:
378 * Default handler for HTML, builds the DOM tree
380 xmlSAXHandler htmlDefaultSAXHandler = {
410 #endif /* LIBXML_HTML_ENABLED */
412 #ifdef LIBXML_DOCB_ENABLED
414 * docbDefaultSAXHandler:
416 * Default handler for SGML DocBook, builds the DOM tree
418 xmlSAXHandler docbDefaultSAXHandler = {
448 #endif /* LIBXML_DOCB_ENABLED */
451 * xmlInitializeGlobalState:
452 * @gs: a pointer to a newly allocated global state
454 * xmlInitializeGlobalState() initialize a global state with all the
455 * default values of the library.
458 xmlInitializeGlobalState(xmlGlobalStatePtr gs)
461 fprintf(stderr, "Initializing globals at %lu for thread %d\n",
462 (unsigned long) gs, xmlGetThreadId());
466 * Perform initialization as required by libxml
468 xmlMutexLock(xmlThrDefMutex);
470 #ifdef LIBXML_DOCB_ENABLED
471 initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
473 #ifdef LIBXML_HTML_ENABLED
474 inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
477 gs->oldXMLWDcompatibility = 0;
478 gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
479 gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
480 initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
481 gs->xmlDefaultSAXLocator.getPublicId = getPublicId;
482 gs->xmlDefaultSAXLocator.getSystemId = getSystemId;
483 gs->xmlDefaultSAXLocator.getLineNumber = getLineNumber;
484 gs->xmlDefaultSAXLocator.getColumnNumber = getColumnNumber;
485 gs->xmlDoValidityCheckingDefaultValue =
486 xmlDoValidityCheckingDefaultValueThrDef;
487 #if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
488 gs->xmlFree = (xmlFreeFunc) xmlMemFree;
489 gs->xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
490 gs->xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
491 gs->xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
492 gs->xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
494 gs->xmlFree = (xmlFreeFunc) free;
495 gs->xmlMalloc = (xmlMallocFunc) malloc;
496 gs->xmlMallocAtomic = (xmlMallocFunc) malloc;
497 gs->xmlRealloc = (xmlReallocFunc) realloc;
498 gs->xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
500 gs->xmlGetWarningsDefaultValue = xmlGetWarningsDefaultValueThrDef;
501 gs->xmlIndentTreeOutput = xmlIndentTreeOutputThrDef;
502 gs->xmlTreeIndentString = xmlTreeIndentStringThrDef;
503 gs->xmlKeepBlanksDefaultValue = xmlKeepBlanksDefaultValueThrDef;
504 gs->xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef;
505 gs->xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef;
506 gs->xmlParserDebugEntities = xmlParserDebugEntitiesThrDef;
507 gs->xmlParserVersion = LIBXML_VERSION_STRING;
508 gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
509 gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
510 gs->xmlSubstituteEntitiesDefaultValue =
511 xmlSubstituteEntitiesDefaultValueThrDef;
513 gs->xmlGenericError = xmlGenericErrorThrDef;
514 gs->xmlGenericErrorContext = xmlGenericErrorContextThrDef;
515 gs->xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef;
516 gs->xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef;
518 xmlMutexUnlock(xmlThrDefMutex);
522 xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
523 xmlMutexLock(xmlThrDefMutex);
524 xmlGenericErrorContextThrDef = ctx;
526 xmlGenericErrorThrDef = handler;
528 xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
529 xmlMutexUnlock(xmlThrDefMutex);
533 * xmlRegisterNodeDefault:
534 * @func: function pointer to the new RegisterNodeFunc
536 * Registers a callback for node creation
538 * Returns the old value of the registration function
541 xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
543 xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue;
545 __xmlRegisterCallbacks = 1;
546 xmlRegisterNodeDefaultValue = func;
551 xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
553 xmlRegisterNodeFunc old;
555 xmlMutexLock(xmlThrDefMutex);
556 old = xmlRegisterNodeDefaultValueThrDef;
558 __xmlRegisterCallbacks = 1;
559 xmlRegisterNodeDefaultValueThrDef = func;
560 xmlMutexUnlock(xmlThrDefMutex);
566 * xmlDeregisterNodeDefault:
567 * @func: function pointer to the new DeregisterNodeFunc
569 * Registers a callback for node destruction
571 * Returns the previous value of the deregistration function
573 xmlDeregisterNodeFunc
574 xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
576 xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue;
578 __xmlRegisterCallbacks = 1;
579 xmlDeregisterNodeDefaultValue = func;
583 xmlDeregisterNodeFunc
584 xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
586 xmlDeregisterNodeFunc old;
588 xmlMutexLock(xmlThrDefMutex);
589 old = xmlDeregisterNodeDefaultValueThrDef;
591 __xmlRegisterCallbacks = 1;
592 xmlDeregisterNodeDefaultValueThrDef = func;
593 xmlMutexUnlock(xmlThrDefMutex);
599 #ifdef LIBXML_DOCB_ENABLED
600 #undef docbDefaultSAXHandler
602 __docbDefaultSAXHandler(void) {
604 return (&docbDefaultSAXHandler);
606 return (&xmlGetGlobalState()->docbDefaultSAXHandler);
610 #ifdef LIBXML_HTML_ENABLED
611 #undef htmlDefaultSAXHandler
613 __htmlDefaultSAXHandler(void) {
615 return (&htmlDefaultSAXHandler);
617 return (&xmlGetGlobalState()->htmlDefaultSAXHandler);
622 * Everything starting from the line below is
623 * Automatically generated by build_glob.py.
624 * Do not modify the previous line.
628 #undef oldXMLWDcompatibility
630 __oldXMLWDcompatibility(void) {
632 return (&oldXMLWDcompatibility);
634 return (&xmlGetGlobalState()->oldXMLWDcompatibility);
637 #undef xmlBufferAllocScheme
638 xmlBufferAllocationScheme *
639 __xmlBufferAllocScheme(void) {
641 return (&xmlBufferAllocScheme);
643 return (&xmlGetGlobalState()->xmlBufferAllocScheme);
645 xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v) {
646 xmlBufferAllocationScheme ret;
647 xmlMutexLock(xmlThrDefMutex);
648 ret = xmlBufferAllocSchemeThrDef;
649 xmlBufferAllocSchemeThrDef = v;
650 xmlMutexUnlock(xmlThrDefMutex);
654 #undef xmlDefaultBufferSize
656 __xmlDefaultBufferSize(void) {
658 return (&xmlDefaultBufferSize);
660 return (&xmlGetGlobalState()->xmlDefaultBufferSize);
662 int xmlThrDefDefaultBufferSize(int v) {
664 xmlMutexLock(xmlThrDefMutex);
665 ret = xmlDefaultBufferSizeThrDef;
666 xmlDefaultBufferSizeThrDef = v;
667 xmlMutexUnlock(xmlThrDefMutex);
671 #undef xmlDefaultSAXHandler
673 __xmlDefaultSAXHandler(void) {
675 return (&xmlDefaultSAXHandler);
677 return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
680 #undef xmlDefaultSAXLocator
682 __xmlDefaultSAXLocator(void) {
684 return (&xmlDefaultSAXLocator);
686 return (&xmlGetGlobalState()->xmlDefaultSAXLocator);
689 #undef xmlDoValidityCheckingDefaultValue
691 __xmlDoValidityCheckingDefaultValue(void) {
693 return (&xmlDoValidityCheckingDefaultValue);
695 return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultValue);
697 int xmlThrDefDoValidityCheckingDefaultValue(int v) {
699 xmlMutexLock(xmlThrDefMutex);
700 ret = xmlDoValidityCheckingDefaultValueThrDef;
701 xmlDoValidityCheckingDefaultValueThrDef = v;
702 xmlMutexUnlock(xmlThrDefMutex);
706 #undef xmlGenericError
707 xmlGenericErrorFunc *
708 __xmlGenericError(void) {
710 return (&xmlGenericError);
712 return (&xmlGetGlobalState()->xmlGenericError);
715 #undef xmlGenericErrorContext
717 __xmlGenericErrorContext(void) {
719 return (&xmlGenericErrorContext);
721 return (&xmlGetGlobalState()->xmlGenericErrorContext);
724 #undef xmlGetWarningsDefaultValue
726 __xmlGetWarningsDefaultValue(void) {
728 return (&xmlGetWarningsDefaultValue);
730 return (&xmlGetGlobalState()->xmlGetWarningsDefaultValue);
732 int xmlThrDefGetWarningsDefaultValue(int v) {
734 xmlMutexLock(xmlThrDefMutex);
735 ret = xmlGetWarningsDefaultValueThrDef;
736 xmlGetWarningsDefaultValueThrDef = v;
737 xmlMutexUnlock(xmlThrDefMutex);
741 #undef xmlIndentTreeOutput
743 __xmlIndentTreeOutput(void) {
745 return (&xmlIndentTreeOutput);
747 return (&xmlGetGlobalState()->xmlIndentTreeOutput);
749 int xmlThrDefIndentTreeOutput(int v) {
751 xmlMutexLock(xmlThrDefMutex);
752 ret = xmlIndentTreeOutputThrDef;
753 xmlIndentTreeOutputThrDef = v;
754 xmlMutexUnlock(xmlThrDefMutex);
758 #undef xmlTreeIndentString
760 __xmlTreeIndentString(void) {
762 return (&xmlTreeIndentString);
764 return (&xmlGetGlobalState()->xmlTreeIndentString);
766 const char * xmlThrDefTreeIndentString(const char * v) {
768 xmlMutexLock(xmlThrDefMutex);
769 ret = xmlTreeIndentStringThrDef;
770 xmlTreeIndentStringThrDef = v;
771 xmlMutexUnlock(xmlThrDefMutex);
775 #undef xmlKeepBlanksDefaultValue
777 __xmlKeepBlanksDefaultValue(void) {
779 return (&xmlKeepBlanksDefaultValue);
781 return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue);
783 int xmlThrDefKeepBlanksDefaultValue(int v) {
785 xmlMutexLock(xmlThrDefMutex);
786 ret = xmlKeepBlanksDefaultValueThrDef;
787 xmlKeepBlanksDefaultValueThrDef = v;
788 xmlMutexUnlock(xmlThrDefMutex);
792 #undef xmlLineNumbersDefaultValue
794 __xmlLineNumbersDefaultValue(void) {
796 return (&xmlLineNumbersDefaultValue);
798 return (&xmlGetGlobalState()->xmlLineNumbersDefaultValue);
800 int xmlThrDefLineNumbersDefaultValue(int v) {
802 xmlMutexLock(xmlThrDefMutex);
803 ret = xmlLineNumbersDefaultValueThrDef;
804 xmlLineNumbersDefaultValueThrDef = v;
805 xmlMutexUnlock(xmlThrDefMutex);
809 #undef xmlLoadExtDtdDefaultValue
811 __xmlLoadExtDtdDefaultValue(void) {
813 return (&xmlLoadExtDtdDefaultValue);
815 return (&xmlGetGlobalState()->xmlLoadExtDtdDefaultValue);
817 int xmlThrDefLoadExtDtdDefaultValue(int v) {
819 xmlMutexLock(xmlThrDefMutex);
820 ret = xmlLoadExtDtdDefaultValueThrDef;
821 xmlLoadExtDtdDefaultValueThrDef = v;
822 xmlMutexUnlock(xmlThrDefMutex);
826 #undef xmlParserDebugEntities
828 __xmlParserDebugEntities(void) {
830 return (&xmlParserDebugEntities);
832 return (&xmlGetGlobalState()->xmlParserDebugEntities);
834 int xmlThrDefParserDebugEntities(int v) {
836 xmlMutexLock(xmlThrDefMutex);
837 ret = xmlParserDebugEntitiesThrDef;
838 xmlParserDebugEntitiesThrDef = v;
839 xmlMutexUnlock(xmlThrDefMutex);
843 #undef xmlParserVersion
845 __xmlParserVersion(void) {
847 return (&xmlParserVersion);
849 return (&xmlGetGlobalState()->xmlParserVersion);
852 #undef xmlPedanticParserDefaultValue
854 __xmlPedanticParserDefaultValue(void) {
856 return (&xmlPedanticParserDefaultValue);
858 return (&xmlGetGlobalState()->xmlPedanticParserDefaultValue);
860 int xmlThrDefPedanticParserDefaultValue(int v) {
862 xmlMutexLock(xmlThrDefMutex);
863 ret = xmlPedanticParserDefaultValueThrDef;
864 xmlPedanticParserDefaultValueThrDef = v;
865 xmlMutexUnlock(xmlThrDefMutex);
869 #undef xmlSaveNoEmptyTags
871 __xmlSaveNoEmptyTags(void) {
873 return (&xmlSaveNoEmptyTags);
875 return (&xmlGetGlobalState()->xmlSaveNoEmptyTags);
877 int xmlThrDefSaveNoEmptyTags(int v) {
879 xmlMutexLock(xmlThrDefMutex);
880 ret = xmlSaveNoEmptyTagsThrDef;
881 xmlSaveNoEmptyTagsThrDef = v;
882 xmlMutexUnlock(xmlThrDefMutex);
886 #undef xmlSubstituteEntitiesDefaultValue
888 __xmlSubstituteEntitiesDefaultValue(void) {
890 return (&xmlSubstituteEntitiesDefaultValue);
892 return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultValue);
894 int xmlThrDefSubstituteEntitiesDefaultValue(int v) {
896 xmlMutexLock(xmlThrDefMutex);
897 ret = xmlSubstituteEntitiesDefaultValueThrDef;
898 xmlSubstituteEntitiesDefaultValueThrDef = v;
899 xmlMutexUnlock(xmlThrDefMutex);
903 #undef xmlRegisterNodeDefaultValue
904 xmlRegisterNodeFunc *
905 __xmlRegisterNodeDefaultValue(void) {
907 return (&xmlRegisterNodeDefaultValue);
909 return (&xmlGetGlobalState()->xmlRegisterNodeDefaultValue);
912 #undef xmlDeregisterNodeDefaultValue
913 xmlDeregisterNodeFunc *
914 __xmlDeregisterNodeDefaultValue(void) {
916 return (&xmlDeregisterNodeDefaultValue);
918 return (&xmlGetGlobalState()->xmlDeregisterNodeDefaultValue);