Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 1 | /* |
| 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 Veillard | 34ce8be | 2002-03-18 19:37:11 +0000 | [diff] [blame] | 14 | #define IN_LIBXML |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 15 | #include "libxml.h" |
| 16 | |
Daniel Veillard | e709061 | 2001-10-13 12:18:28 +0000 | [diff] [blame] | 17 | #ifdef HAVE_STDLIB_H |
Jaka Mocnik | 77d19ae | 2001-10-13 12:06:09 +0000 | [diff] [blame] | 18 | #include <stdlib.h> |
Daniel Veillard | e709061 | 2001-10-13 12:18:28 +0000 | [diff] [blame] | 19 | #endif |
Jaka Mocnik | 77d19ae | 2001-10-13 12:06:09 +0000 | [diff] [blame] | 20 | #include <string.h> |
| 21 | |
Daniel Veillard | 3c01b1d | 2001-10-17 15:58:35 +0000 | [diff] [blame] | 22 | #include <libxml/globals.h> |
Daniel Veillard | e709061 | 2001-10-13 12:18:28 +0000 | [diff] [blame] | 23 | #include <libxml/xmlmemory.h> |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 24 | #include <libxml/threads.h> |
Daniel Veillard | e709061 | 2001-10-13 12:18:28 +0000 | [diff] [blame] | 25 | |
Daniel Veillard | 3c01b1d | 2001-10-17 15:58:35 +0000 | [diff] [blame] | 26 | /* #define DEBUG_GLOBALS */ |
| 27 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 28 | /* |
| 29 | * Helpful Macro |
| 30 | */ |
Daniel Veillard | 3c01b1d | 2001-10-17 15:58:35 +0000 | [diff] [blame] | 31 | #ifdef LIBXML_THREAD_ENABLED |
| 32 | #define IS_MAIN_THREAD (xmlIsMainThread()) |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 33 | #else |
| 34 | #define IS_MAIN_THREAD 1 |
| 35 | #endif |
| 36 | |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 37 | /* |
| 38 | * Mutex to protect "ForNewThreads" variables |
| 39 | */ |
| 40 | static xmlMutexPtr xmlThrDefMutex = NULL; |
| 41 | |
| 42 | void xmlInitGlobals() |
| 43 | { |
| 44 | xmlThrDefMutex = xmlNewMutex(); |
| 45 | } |
| 46 | |
| 47 | void xmlCleanupGlobals() |
| 48 | { |
Daniel Veillard | 2009c4e | 2003-07-15 20:04:34 +0000 | [diff] [blame] | 49 | if (xmlThrDefMutex != NULL) { |
Daniel Veillard | df101d8 | 2003-07-08 14:03:36 +0000 | [diff] [blame] | 50 | xmlFreeMutex(xmlThrDefMutex); |
Daniel Veillard | 2009c4e | 2003-07-15 20:04:34 +0000 | [diff] [blame] | 51 | xmlThrDefMutex = NULL; |
| 52 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 53 | } |
| 54 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 55 | /************************************************************************ |
| 56 | * * |
| 57 | * All the user accessible global variables of the library * |
| 58 | * * |
| 59 | ************************************************************************/ |
| 60 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 61 | /* |
| 62 | * Memory allocation routines |
| 63 | */ |
Daniel Veillard | 7216cfd | 2002-11-08 15:10:00 +0000 | [diff] [blame] | 64 | #if defined(DEBUG_MEMORY_LOCATION) || defined(DEBUG_MEMORY) |
Daniel Veillard | 9848532 | 2003-08-14 15:44:40 +0000 | [diff] [blame] | 65 | #ifndef _DEBUG_MEMORY_ALLOC_ |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 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); |
Daniel Veillard | 9848532 | 2003-08-14 15:44:40 +0000 | [diff] [blame] | 70 | #endif |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 71 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 72 | xmlFreeFunc xmlFree = (xmlFreeFunc) xmlMemFree; |
| 73 | xmlMallocFunc xmlMalloc = (xmlMallocFunc) xmlMemMalloc; |
Daniel Veillard | 3c908dc | 2003-04-19 00:07:51 +0000 | [diff] [blame] | 74 | xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 75 | xmlReallocFunc xmlRealloc = (xmlReallocFunc) xmlMemRealloc; |
| 76 | xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup; |
| 77 | #else |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 78 | /** |
| 79 | * xmlFree: |
| 80 | * @mem: an already allocated block of memory |
| 81 | * |
| 82 | * The variable holding the libxml free() implementation |
| 83 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 84 | xmlFreeFunc xmlFree = (xmlFreeFunc) free; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 85 | /** |
| 86 | * xmlMalloc: |
| 87 | * @size: the size requested in bytes |
| 88 | * |
| 89 | * The variable holding the libxml malloc() implementation |
| 90 | * |
| 91 | * Returns a pointer to the newly allocated block or NULL in case of error |
| 92 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 93 | xmlMallocFunc xmlMalloc = (xmlMallocFunc) malloc; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 94 | /** |
Daniel Veillard | 3c908dc | 2003-04-19 00:07:51 +0000 | [diff] [blame] | 95 | * xmlMallocAtomic: |
| 96 | * @size: the size requested in bytes |
| 97 | * |
| 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. |
| 101 | * |
| 102 | * Returns a pointer to the newly allocated block or NULL in case of error |
| 103 | */ |
| 104 | xmlMallocFunc xmlMallocAtomic = (xmlMallocFunc) malloc; |
| 105 | /** |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 106 | * xmlRealloc: |
| 107 | * @mem: an already allocated block of memory |
| 108 | * @size: the new size requested in bytes |
| 109 | * |
| 110 | * The variable holding the libxml realloc() implementation |
| 111 | * |
| 112 | * Returns a pointer to the newly reallocated block or NULL in case of error |
| 113 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 114 | xmlReallocFunc xmlRealloc = (xmlReallocFunc) realloc; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 115 | /** |
| 116 | * xmlMemStrdup: |
| 117 | * @str: a zero terminated string |
| 118 | * |
| 119 | * The variable holding the libxml strdup() implementation |
| 120 | * |
| 121 | * Returns the copy of the string or NULL in case of error |
| 122 | */ |
Daniel Veillard | b82c166 | 2001-12-09 14:00:54 +0000 | [diff] [blame] | 123 | xmlStrdupFunc xmlMemStrdup = (xmlStrdupFunc) xmlStrdup; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 124 | #endif |
| 125 | |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 126 | #include <libxml/threads.h> |
| 127 | #include <libxml/globals.h> |
| 128 | #include <libxml/SAX.h> |
| 129 | |
| 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 |
Aleksey Sanin | 2300256 | 2002-05-24 07:18:40 +0000 | [diff] [blame] | 142 | #undef xmlTreeIndentString |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 143 | #undef xmlKeepBlanksDefaultValue |
| 144 | #undef xmlLineNumbersDefaultValue |
| 145 | #undef xmlLoadExtDtdDefaultValue |
| 146 | #undef xmlParserDebugEntities |
| 147 | #undef xmlParserVersion |
| 148 | #undef xmlPedanticParserDefaultValue |
| 149 | #undef xmlSaveNoEmptyTags |
| 150 | #undef xmlSubstituteEntitiesDefaultValue |
Daniel Veillard | 8326e73 | 2003-01-07 00:19:07 +0000 | [diff] [blame] | 151 | #undef xmlRegisterNodeDefaultValue |
| 152 | #undef xmlDeregisterNodeDefaultValue |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 153 | |
| 154 | #undef xmlFree |
| 155 | #undef xmlMalloc |
Daniel Veillard | 3c908dc | 2003-04-19 00:07:51 +0000 | [diff] [blame] | 156 | #undef xmlMallocAtomic |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 157 | #undef xmlMemStrdup |
| 158 | #undef xmlRealloc |
| 159 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 160 | /** |
| 161 | * xmlParserVersion: |
| 162 | * |
| 163 | * Constant string describing the internal version of the library |
| 164 | */ |
Daniel Veillard | 3c01b1d | 2001-10-17 15:58:35 +0000 | [diff] [blame] | 165 | const char *xmlParserVersion = LIBXML_VERSION_STRING; |
| 166 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 167 | /** |
| 168 | * xmlBufferAllocScheme: |
| 169 | * |
| 170 | * Global setting, default allocation policy for buffers, default is |
| 171 | * XML_BUFFER_ALLOC_EXACT |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 172 | */ |
| 173 | xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 174 | static xmlBufferAllocationScheme xmlBufferAllocSchemeThrDef = XML_BUFFER_ALLOC_EXACT; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 175 | /** |
| 176 | * xmlDefaultBufferSize: |
| 177 | * |
| 178 | * Global setting, default buffer size. Default value is BASE_BUFFER_SIZE |
| 179 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 180 | int xmlDefaultBufferSize = BASE_BUFFER_SIZE; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 181 | static int xmlDefaultBufferSizeThrDef = BASE_BUFFER_SIZE; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 182 | |
| 183 | /* |
| 184 | * Parser defaults |
| 185 | */ |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 186 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 187 | /** |
| 188 | * oldXMLWDcompatibility: |
| 189 | * |
| 190 | * Global setting, DEPRECATED. |
| 191 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 192 | int oldXMLWDcompatibility = 0; /* DEPRECATED */ |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 193 | /** |
| 194 | * xmlParserDebugEntities: |
| 195 | * |
| 196 | * Global setting, asking the parser to print out debugging informations. |
| 197 | * while handling entities. |
| 198 | * Disabled by default |
| 199 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 200 | int xmlParserDebugEntities = 0; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 201 | static int xmlParserDebugEntitiesThrDef = 0; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 202 | /** |
| 203 | * xmlDoValidityCheckingDefaultValue: |
| 204 | * |
| 205 | * Global setting, indicate that the parser should work in validating mode. |
| 206 | * Disabled by default. |
| 207 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 208 | int xmlDoValidityCheckingDefaultValue = 0; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 209 | static int xmlDoValidityCheckingDefaultValueThrDef = 0; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 210 | /** |
| 211 | * xmlGetWarningsDefaultValue: |
| 212 | * |
| 213 | * Global setting, indicate that the parser should provide warnings. |
| 214 | * Activated by default. |
| 215 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 216 | int xmlGetWarningsDefaultValue = 1; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 217 | static int xmlGetWarningsDefaultValueThrDef = 1; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 218 | /** |
| 219 | * xmlLoadExtDtdDefaultValue: |
| 220 | * |
| 221 | * Global setting, indicate that the parser should load DTD while not |
| 222 | * validating. |
| 223 | * Disabled by default. |
| 224 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 225 | int xmlLoadExtDtdDefaultValue = 0; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 226 | static int xmlLoadExtDtdDefaultValueThrDef = 0; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 227 | /** |
| 228 | * xmlPedanticParserDefaultValue: |
| 229 | * |
| 230 | * Global setting, indicate that the parser be pedantic |
| 231 | * Disabled by default. |
| 232 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 233 | int xmlPedanticParserDefaultValue = 0; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 234 | static int xmlPedanticParserDefaultValueThrDef = 0; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 235 | /** |
| 236 | * xmlLineNumbersDefaultValue: |
| 237 | * |
| 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 |
| 241 | * applicaton. |
| 242 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 243 | int xmlLineNumbersDefaultValue = 0; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 244 | static int xmlLineNumbersDefaultValueThrDef = 0; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 245 | /** |
| 246 | * xmlKeepBlanksDefaultValue: |
| 247 | * |
| 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. |
| 253 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 254 | int xmlKeepBlanksDefaultValue = 1; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 255 | static int xmlKeepBlanksDefaultValueThrDef = 1; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 256 | /** |
| 257 | * xmlSubstituteEntitiesDefaultValue: |
| 258 | * |
| 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. |
| 264 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 265 | int xmlSubstituteEntitiesDefaultValue = 0; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 266 | static int xmlSubstituteEntitiesDefaultValueThrDef = 0; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 267 | |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 268 | xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 269 | static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL; |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 270 | xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 271 | static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL; |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 272 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 273 | /* |
| 274 | * Error handling |
| 275 | */ |
| 276 | |
| 277 | /* xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; */ |
| 278 | /* Must initialize xmlGenericError in xmlInitParser */ |
Daniel Veillard | 635ef72 | 2001-10-29 11:48:19 +0000 | [diff] [blame] | 279 | void xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, |
| 280 | const char *msg, |
| 281 | ...); |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 282 | /** |
| 283 | * xmlGenericError: |
| 284 | * |
| 285 | * Global setting: function used for generic error callbacks |
| 286 | */ |
Daniel Veillard | 635ef72 | 2001-10-29 11:48:19 +0000 | [diff] [blame] | 287 | xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 288 | static xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc; |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 289 | /** |
| 290 | * xmlGenericErrorContext: |
| 291 | * |
| 292 | * Global setting passed to generic error callbacks |
| 293 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 294 | void *xmlGenericErrorContext = NULL; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 295 | static void *xmlGenericErrorContextThrDef = NULL; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 296 | |
| 297 | /* |
| 298 | * output defaults |
| 299 | */ |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 300 | /** |
| 301 | * xmlIndentTreeOutput: |
| 302 | * |
| 303 | * Global setting, asking the serializer to indent the output tree by default |
Aleksey Sanin | 2300256 | 2002-05-24 07:18:40 +0000 | [diff] [blame] | 304 | * Enabled by default |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 305 | */ |
Aleksey Sanin | 2300256 | 2002-05-24 07:18:40 +0000 | [diff] [blame] | 306 | int xmlIndentTreeOutput = 1; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 307 | static int xmlIndentTreeOutputThrDef = 1; |
Aleksey Sanin | 2300256 | 2002-05-24 07:18:40 +0000 | [diff] [blame] | 308 | |
| 309 | /** |
| 310 | * xmlTreeIndentString: |
| 311 | * |
| 312 | * The string used to do one-level indent. By default is equal to " " (two spaces) |
| 313 | */ |
| 314 | const char *xmlTreeIndentString = " "; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 315 | static const char *xmlTreeIndentStringThrDef = " "; |
Aleksey Sanin | 2300256 | 2002-05-24 07:18:40 +0000 | [diff] [blame] | 316 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 317 | /** |
| 318 | * xmlSaveNoEmptyTags: |
| 319 | * |
| 320 | * Global setting, asking the serializer to not output empty tags |
| 321 | * as <empty/> but <empty></empty>. those two forms are undistinguishable |
| 322 | * once parsed. |
| 323 | * Disabled by default |
| 324 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 325 | int xmlSaveNoEmptyTags = 0; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 326 | int xmlSaveNoEmptyTagsThrDef = 0; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 327 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 328 | /** |
| 329 | * xmlDefaultSAXHandler: |
| 330 | * |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 331 | * Default handler for XML, builds the DOM tree |
| 332 | */ |
| 333 | xmlSAXHandler xmlDefaultSAXHandler = { |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 334 | xmlSAX2InternalSubset, |
| 335 | xmlSAX2IsStandalone, |
| 336 | xmlSAX2HasInternalSubset, |
| 337 | xmlSAX2HasExternalSubset, |
| 338 | xmlSAX2ResolveEntity, |
| 339 | xmlSAX2GetEntity, |
| 340 | xmlSAX2EntityDecl, |
| 341 | xmlSAX2NotationDecl, |
| 342 | xmlSAX2AttributeDecl, |
| 343 | xmlSAX2ElementDecl, |
| 344 | xmlSAX2UnparsedEntityDecl, |
| 345 | xmlSAX2SetDocumentLocator, |
| 346 | xmlSAX2StartDocument, |
| 347 | xmlSAX2EndDocument, |
| 348 | xmlSAX2StartElement, |
| 349 | xmlSAX2EndElement, |
| 350 | xmlSAX2Reference, |
| 351 | xmlSAX2Characters, |
| 352 | xmlSAX2Characters, |
| 353 | xmlSAX2ProcessingInstruction, |
| 354 | xmlSAX2Comment, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 355 | xmlParserWarning, |
| 356 | xmlParserError, |
| 357 | xmlParserError, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 358 | xmlSAX2GetParameterEntity, |
| 359 | xmlSAX2CDataBlock, |
| 360 | xmlSAX2ExternalSubset, |
| 361 | 0, |
| 362 | NULL, |
| 363 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 364 | NULL |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 365 | }; |
| 366 | |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 367 | /** |
| 368 | * xmlDefaultSAXLocator: |
| 369 | * |
| 370 | * The default SAX Locator |
| 371 | * { getPublicId, getSystemId, getLineNumber, getColumnNumber} |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 372 | */ |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 373 | xmlSAXLocator xmlDefaultSAXLocator = { |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 374 | xmlSAX2GetPublicId, |
| 375 | xmlSAX2GetSystemId, |
| 376 | xmlSAX2GetLineNumber, |
| 377 | xmlSAX2GetColumnNumber |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 378 | }; |
| 379 | |
| 380 | #ifdef LIBXML_HTML_ENABLED |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 381 | /** |
| 382 | * htmlDefaultSAXHandler: |
| 383 | * |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 384 | * Default handler for HTML, builds the DOM tree |
| 385 | */ |
| 386 | xmlSAXHandler htmlDefaultSAXHandler = { |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 387 | xmlSAX2InternalSubset, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 388 | NULL, |
| 389 | NULL, |
| 390 | NULL, |
| 391 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 392 | xmlSAX2GetEntity, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 393 | NULL, |
| 394 | NULL, |
| 395 | NULL, |
| 396 | NULL, |
| 397 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 398 | xmlSAX2SetDocumentLocator, |
| 399 | xmlSAX2StartDocument, |
| 400 | xmlSAX2EndDocument, |
| 401 | xmlSAX2StartElement, |
| 402 | xmlSAX2EndElement, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 403 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 404 | xmlSAX2Characters, |
| 405 | xmlSAX2IgnorableWhitespace, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 406 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 407 | xmlSAX2Comment, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 408 | xmlParserWarning, |
| 409 | xmlParserError, |
| 410 | xmlParserError, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 411 | xmlSAX2GetParameterEntity, |
| 412 | xmlSAX2CDataBlock, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 413 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 414 | 0, |
| 415 | NULL, |
| 416 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 417 | NULL |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 418 | }; |
| 419 | #endif /* LIBXML_HTML_ENABLED */ |
| 420 | |
| 421 | #ifdef LIBXML_DOCB_ENABLED |
Daniel Veillard | 9d06d30 | 2002-01-22 18:15:52 +0000 | [diff] [blame] | 422 | /** |
| 423 | * docbDefaultSAXHandler: |
| 424 | * |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 425 | * Default handler for SGML DocBook, builds the DOM tree |
| 426 | */ |
| 427 | xmlSAXHandler docbDefaultSAXHandler = { |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 428 | xmlSAX2InternalSubset, |
| 429 | xmlSAX2IsStandalone, |
| 430 | xmlSAX2HasInternalSubset, |
| 431 | xmlSAX2HasExternalSubset, |
| 432 | xmlSAX2ResolveEntity, |
| 433 | xmlSAX2GetEntity, |
| 434 | xmlSAX2EntityDecl, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 435 | NULL, |
| 436 | NULL, |
| 437 | NULL, |
| 438 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 439 | xmlSAX2SetDocumentLocator, |
| 440 | xmlSAX2StartDocument, |
| 441 | xmlSAX2EndDocument, |
| 442 | xmlSAX2StartElement, |
| 443 | xmlSAX2EndElement, |
| 444 | xmlSAX2Reference, |
| 445 | xmlSAX2Characters, |
| 446 | xmlSAX2IgnorableWhitespace, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 447 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 448 | xmlSAX2Comment, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 449 | xmlParserWarning, |
| 450 | xmlParserError, |
| 451 | xmlParserError, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 452 | xmlSAX2GetParameterEntity, |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 453 | NULL, |
| 454 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 455 | 0, |
| 456 | NULL, |
| 457 | NULL, |
Daniel Veillard | 1af9a41 | 2003-08-20 22:54:39 +0000 | [diff] [blame] | 458 | NULL |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 459 | }; |
| 460 | #endif /* LIBXML_DOCB_ENABLED */ |
| 461 | |
| 462 | /** |
| 463 | * xmlInitializeGlobalState: |
| 464 | * @gs: a pointer to a newly allocated global state |
| 465 | * |
| 466 | * xmlInitializeGlobalState() initialize a global state with all the |
| 467 | * default values of the library. |
| 468 | */ |
| 469 | void |
| 470 | xmlInitializeGlobalState(xmlGlobalStatePtr gs) |
| 471 | { |
Daniel Veillard | 3c01b1d | 2001-10-17 15:58:35 +0000 | [diff] [blame] | 472 | #ifdef DEBUG_GLOBALS |
| 473 | fprintf(stderr, "Initializing globals at %lu for thread %d\n", |
| 474 | (unsigned long) gs, xmlGetThreadId()); |
| 475 | #endif |
| 476 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 477 | /* |
Daniel Veillard | cbaf399 | 2001-12-31 16:16:02 +0000 | [diff] [blame] | 478 | * Perform initialization as required by libxml |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 479 | */ |
Daniel Veillard | 5805be2 | 2003-08-28 08:03:23 +0000 | [diff] [blame] | 480 | if (xmlThrDefMutex == NULL) |
| 481 | xmlInitGlobals(); |
| 482 | |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 483 | xmlMutexLock(xmlThrDefMutex); |
William M. Brack | 8b2c7f1 | 2002-11-22 05:07:29 +0000 | [diff] [blame] | 484 | |
Daniel Veillard | a4617b8 | 2001-11-04 20:19:12 +0000 | [diff] [blame] | 485 | #ifdef LIBXML_DOCB_ENABLED |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 486 | xmlSAX2InitDocbDefaultSAXHandler(&gs->docbDefaultSAXHandler); |
Daniel Veillard | a4617b8 | 2001-11-04 20:19:12 +0000 | [diff] [blame] | 487 | #endif |
| 488 | #ifdef LIBXML_HTML_ENABLED |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 489 | xmlSAX2InitHtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler); |
Daniel Veillard | a4617b8 | 2001-11-04 20:19:12 +0000 | [diff] [blame] | 490 | #endif |
Daniel Veillard | 3c01b1d | 2001-10-17 15:58:35 +0000 | [diff] [blame] | 491 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 492 | gs->oldXMLWDcompatibility = 0; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 493 | gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef; |
| 494 | gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef; |
Daniel Veillard | 07cb822 | 2003-09-10 10:51:05 +0000 | [diff] [blame] | 495 | xmlSAX2InitDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 496 | gs->xmlDefaultSAXLocator.getPublicId = getPublicId; |
| 497 | gs->xmlDefaultSAXLocator.getSystemId = getSystemId; |
| 498 | gs->xmlDefaultSAXLocator.getLineNumber = getLineNumber; |
| 499 | gs->xmlDefaultSAXLocator.getColumnNumber = getColumnNumber; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 500 | gs->xmlDoValidityCheckingDefaultValue = |
| 501 | xmlDoValidityCheckingDefaultValueThrDef; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 502 | #if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY) |
| 503 | gs->xmlFree = (xmlFreeFunc) xmlMemFree; |
| 504 | gs->xmlMalloc = (xmlMallocFunc) xmlMemMalloc; |
Daniel Veillard | 3c908dc | 2003-04-19 00:07:51 +0000 | [diff] [blame] | 505 | gs->xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 506 | gs->xmlRealloc = (xmlReallocFunc) xmlMemRealloc; |
| 507 | gs->xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup; |
| 508 | #else |
| 509 | gs->xmlFree = (xmlFreeFunc) free; |
| 510 | gs->xmlMalloc = (xmlMallocFunc) malloc; |
Daniel Veillard | 3c908dc | 2003-04-19 00:07:51 +0000 | [diff] [blame] | 511 | gs->xmlMallocAtomic = (xmlMallocFunc) malloc; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 512 | gs->xmlRealloc = (xmlReallocFunc) realloc; |
Daniel Veillard | 572577e | 2002-01-18 16:23:55 +0000 | [diff] [blame] | 513 | gs->xmlMemStrdup = (xmlStrdupFunc) xmlStrdup; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 514 | #endif |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 515 | gs->xmlGetWarningsDefaultValue = xmlGetWarningsDefaultValueThrDef; |
| 516 | gs->xmlIndentTreeOutput = xmlIndentTreeOutputThrDef; |
| 517 | gs->xmlTreeIndentString = xmlTreeIndentStringThrDef; |
| 518 | gs->xmlKeepBlanksDefaultValue = xmlKeepBlanksDefaultValueThrDef; |
| 519 | gs->xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef; |
| 520 | gs->xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef; |
| 521 | gs->xmlParserDebugEntities = xmlParserDebugEntitiesThrDef; |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 522 | gs->xmlParserVersion = LIBXML_VERSION_STRING; |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 523 | gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef; |
| 524 | gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef; |
| 525 | gs->xmlSubstituteEntitiesDefaultValue = |
| 526 | xmlSubstituteEntitiesDefaultValueThrDef; |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 527 | |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 528 | gs->xmlGenericError = xmlGenericErrorThrDef; |
| 529 | gs->xmlGenericErrorContext = xmlGenericErrorContextThrDef; |
| 530 | gs->xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef; |
| 531 | gs->xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef; |
| 532 | |
| 533 | xmlMutexUnlock(xmlThrDefMutex); |
| 534 | } |
| 535 | |
| 536 | void |
| 537 | xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) { |
| 538 | xmlMutexLock(xmlThrDefMutex); |
| 539 | xmlGenericErrorContextThrDef = ctx; |
| 540 | if (handler != NULL) |
| 541 | xmlGenericErrorThrDef = handler; |
| 542 | else |
| 543 | xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc; |
| 544 | xmlMutexUnlock(xmlThrDefMutex); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 545 | } |
| 546 | |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 547 | /** |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 548 | * xmlRegisterNodeDefault: |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 549 | * @func: function pointer to the new RegisterNodeFunc |
| 550 | * |
Daniel Veillard | 1703c5f | 2003-02-10 14:28:44 +0000 | [diff] [blame] | 551 | * Registers a callback for node creation |
| 552 | * |
| 553 | * Returns the old value of the registration function |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 554 | */ |
| 555 | xmlRegisterNodeFunc |
| 556 | xmlRegisterNodeDefault(xmlRegisterNodeFunc func) |
| 557 | { |
| 558 | xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue; |
| 559 | |
Daniel Veillard | a880b12 | 2003-04-21 21:36:41 +0000 | [diff] [blame] | 560 | __xmlRegisterCallbacks = 1; |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 561 | xmlRegisterNodeDefaultValue = func; |
| 562 | return(old); |
| 563 | } |
| 564 | |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 565 | xmlRegisterNodeFunc |
| 566 | xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func) |
| 567 | { |
| 568 | xmlRegisterNodeFunc old; |
| 569 | |
| 570 | xmlMutexLock(xmlThrDefMutex); |
| 571 | old = xmlRegisterNodeDefaultValueThrDef; |
| 572 | |
| 573 | __xmlRegisterCallbacks = 1; |
| 574 | xmlRegisterNodeDefaultValueThrDef = func; |
| 575 | xmlMutexUnlock(xmlThrDefMutex); |
| 576 | |
| 577 | return(old); |
| 578 | } |
| 579 | |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 580 | /** |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 581 | * xmlDeregisterNodeDefault: |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 582 | * @func: function pointer to the new DeregisterNodeFunc |
| 583 | * |
Daniel Veillard | 1703c5f | 2003-02-10 14:28:44 +0000 | [diff] [blame] | 584 | * Registers a callback for node destruction |
| 585 | * |
Daniel Veillard | 7b4b2f9 | 2003-01-06 13:11:20 +0000 | [diff] [blame] | 586 | * Returns the previous value of the deregistration function |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 587 | */ |
| 588 | xmlDeregisterNodeFunc |
| 589 | xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func) |
| 590 | { |
| 591 | xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue; |
| 592 | |
Daniel Veillard | a880b12 | 2003-04-21 21:36:41 +0000 | [diff] [blame] | 593 | __xmlRegisterCallbacks = 1; |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 594 | xmlDeregisterNodeDefaultValue = func; |
| 595 | return(old); |
| 596 | } |
| 597 | |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 598 | xmlDeregisterNodeFunc |
| 599 | xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func) |
| 600 | { |
| 601 | xmlDeregisterNodeFunc old; |
| 602 | |
| 603 | xmlMutexLock(xmlThrDefMutex); |
| 604 | old = xmlDeregisterNodeDefaultValueThrDef; |
| 605 | |
| 606 | __xmlRegisterCallbacks = 1; |
| 607 | xmlDeregisterNodeDefaultValueThrDef = func; |
| 608 | xmlMutexUnlock(xmlThrDefMutex); |
| 609 | |
| 610 | return(old); |
| 611 | } |
| 612 | |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 613 | |
Daniel Veillard | a4617b8 | 2001-11-04 20:19:12 +0000 | [diff] [blame] | 614 | #ifdef LIBXML_DOCB_ENABLED |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 615 | #undef docbDefaultSAXHandler |
| 616 | xmlSAXHandler * |
| 617 | __docbDefaultSAXHandler(void) { |
| 618 | if (IS_MAIN_THREAD) |
| 619 | return (&docbDefaultSAXHandler); |
| 620 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 621 | return (&xmlGetGlobalState()->docbDefaultSAXHandler); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 622 | } |
Daniel Veillard | a4617b8 | 2001-11-04 20:19:12 +0000 | [diff] [blame] | 623 | #endif |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 624 | |
Daniel Veillard | a4617b8 | 2001-11-04 20:19:12 +0000 | [diff] [blame] | 625 | #ifdef LIBXML_HTML_ENABLED |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 626 | #undef htmlDefaultSAXHandler |
| 627 | xmlSAXHandler * |
| 628 | __htmlDefaultSAXHandler(void) { |
| 629 | if (IS_MAIN_THREAD) |
| 630 | return (&htmlDefaultSAXHandler); |
| 631 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 632 | return (&xmlGetGlobalState()->htmlDefaultSAXHandler); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 633 | } |
Daniel Veillard | a4617b8 | 2001-11-04 20:19:12 +0000 | [diff] [blame] | 634 | #endif |
| 635 | |
| 636 | /* |
| 637 | * Everything starting from the line below is |
| 638 | * Automatically generated by build_glob.py. |
| 639 | * Do not modify the previous line. |
| 640 | */ |
| 641 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 642 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 643 | #undef oldXMLWDcompatibility |
| 644 | int * |
| 645 | __oldXMLWDcompatibility(void) { |
| 646 | if (IS_MAIN_THREAD) |
| 647 | return (&oldXMLWDcompatibility); |
| 648 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 649 | return (&xmlGetGlobalState()->oldXMLWDcompatibility); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 650 | } |
| 651 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 652 | #undef xmlBufferAllocScheme |
| 653 | xmlBufferAllocationScheme * |
| 654 | __xmlBufferAllocScheme(void) { |
| 655 | if (IS_MAIN_THREAD) |
| 656 | return (&xmlBufferAllocScheme); |
| 657 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 658 | return (&xmlGetGlobalState()->xmlBufferAllocScheme); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 659 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 660 | xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v) { |
| 661 | xmlBufferAllocationScheme ret; |
| 662 | xmlMutexLock(xmlThrDefMutex); |
| 663 | ret = xmlBufferAllocSchemeThrDef; |
| 664 | xmlBufferAllocSchemeThrDef = v; |
| 665 | xmlMutexUnlock(xmlThrDefMutex); |
| 666 | return ret; |
| 667 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 668 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 669 | #undef xmlDefaultBufferSize |
| 670 | int * |
| 671 | __xmlDefaultBufferSize(void) { |
| 672 | if (IS_MAIN_THREAD) |
| 673 | return (&xmlDefaultBufferSize); |
| 674 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 675 | return (&xmlGetGlobalState()->xmlDefaultBufferSize); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 676 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 677 | int xmlThrDefDefaultBufferSize(int v) { |
| 678 | int ret; |
| 679 | xmlMutexLock(xmlThrDefMutex); |
| 680 | ret = xmlDefaultBufferSizeThrDef; |
| 681 | xmlDefaultBufferSizeThrDef = v; |
| 682 | xmlMutexUnlock(xmlThrDefMutex); |
| 683 | return ret; |
| 684 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 685 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 686 | #undef xmlDefaultSAXHandler |
| 687 | xmlSAXHandler * |
| 688 | __xmlDefaultSAXHandler(void) { |
| 689 | if (IS_MAIN_THREAD) |
| 690 | return (&xmlDefaultSAXHandler); |
| 691 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 692 | return (&xmlGetGlobalState()->xmlDefaultSAXHandler); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 693 | } |
| 694 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 695 | #undef xmlDefaultSAXLocator |
| 696 | xmlSAXLocator * |
| 697 | __xmlDefaultSAXLocator(void) { |
| 698 | if (IS_MAIN_THREAD) |
| 699 | return (&xmlDefaultSAXLocator); |
| 700 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 701 | return (&xmlGetGlobalState()->xmlDefaultSAXLocator); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 702 | } |
| 703 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 704 | #undef xmlDoValidityCheckingDefaultValue |
| 705 | int * |
| 706 | __xmlDoValidityCheckingDefaultValue(void) { |
| 707 | if (IS_MAIN_THREAD) |
| 708 | return (&xmlDoValidityCheckingDefaultValue); |
| 709 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 710 | return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultValue); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 711 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 712 | int xmlThrDefDoValidityCheckingDefaultValue(int v) { |
| 713 | int ret; |
| 714 | xmlMutexLock(xmlThrDefMutex); |
| 715 | ret = xmlDoValidityCheckingDefaultValueThrDef; |
| 716 | xmlDoValidityCheckingDefaultValueThrDef = v; |
| 717 | xmlMutexUnlock(xmlThrDefMutex); |
| 718 | return ret; |
| 719 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 720 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 721 | #undef xmlGenericError |
| 722 | xmlGenericErrorFunc * |
| 723 | __xmlGenericError(void) { |
| 724 | if (IS_MAIN_THREAD) |
| 725 | return (&xmlGenericError); |
| 726 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 727 | return (&xmlGetGlobalState()->xmlGenericError); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 728 | } |
| 729 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 730 | #undef xmlGenericErrorContext |
| 731 | void * * |
| 732 | __xmlGenericErrorContext(void) { |
| 733 | if (IS_MAIN_THREAD) |
| 734 | return (&xmlGenericErrorContext); |
| 735 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 736 | return (&xmlGetGlobalState()->xmlGenericErrorContext); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 737 | } |
| 738 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 739 | #undef xmlGetWarningsDefaultValue |
| 740 | int * |
| 741 | __xmlGetWarningsDefaultValue(void) { |
| 742 | if (IS_MAIN_THREAD) |
| 743 | return (&xmlGetWarningsDefaultValue); |
| 744 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 745 | return (&xmlGetGlobalState()->xmlGetWarningsDefaultValue); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 746 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 747 | int xmlThrDefGetWarningsDefaultValue(int v) { |
| 748 | int ret; |
| 749 | xmlMutexLock(xmlThrDefMutex); |
| 750 | ret = xmlGetWarningsDefaultValueThrDef; |
| 751 | xmlGetWarningsDefaultValueThrDef = v; |
| 752 | xmlMutexUnlock(xmlThrDefMutex); |
| 753 | return ret; |
| 754 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 755 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 756 | #undef xmlIndentTreeOutput |
| 757 | int * |
| 758 | __xmlIndentTreeOutput(void) { |
| 759 | if (IS_MAIN_THREAD) |
| 760 | return (&xmlIndentTreeOutput); |
| 761 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 762 | return (&xmlGetGlobalState()->xmlIndentTreeOutput); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 763 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 764 | int xmlThrDefIndentTreeOutput(int v) { |
| 765 | int ret; |
| 766 | xmlMutexLock(xmlThrDefMutex); |
| 767 | ret = xmlIndentTreeOutputThrDef; |
| 768 | xmlIndentTreeOutputThrDef = v; |
| 769 | xmlMutexUnlock(xmlThrDefMutex); |
| 770 | return ret; |
| 771 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 772 | |
Aleksey Sanin | 2300256 | 2002-05-24 07:18:40 +0000 | [diff] [blame] | 773 | #undef xmlTreeIndentString |
| 774 | const char * * |
| 775 | __xmlTreeIndentString(void) { |
| 776 | if (IS_MAIN_THREAD) |
| 777 | return (&xmlTreeIndentString); |
| 778 | else |
| 779 | return (&xmlGetGlobalState()->xmlTreeIndentString); |
| 780 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 781 | const char * xmlThrDefTreeIndentString(const char * v) { |
| 782 | const char * ret; |
| 783 | xmlMutexLock(xmlThrDefMutex); |
| 784 | ret = xmlTreeIndentStringThrDef; |
| 785 | xmlTreeIndentStringThrDef = v; |
| 786 | xmlMutexUnlock(xmlThrDefMutex); |
| 787 | return ret; |
| 788 | } |
Aleksey Sanin | 2300256 | 2002-05-24 07:18:40 +0000 | [diff] [blame] | 789 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 790 | #undef xmlKeepBlanksDefaultValue |
| 791 | int * |
| 792 | __xmlKeepBlanksDefaultValue(void) { |
| 793 | if (IS_MAIN_THREAD) |
| 794 | return (&xmlKeepBlanksDefaultValue); |
| 795 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 796 | return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 797 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 798 | int xmlThrDefKeepBlanksDefaultValue(int v) { |
| 799 | int ret; |
| 800 | xmlMutexLock(xmlThrDefMutex); |
| 801 | ret = xmlKeepBlanksDefaultValueThrDef; |
| 802 | xmlKeepBlanksDefaultValueThrDef = v; |
| 803 | xmlMutexUnlock(xmlThrDefMutex); |
| 804 | return ret; |
| 805 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 806 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 807 | #undef xmlLineNumbersDefaultValue |
| 808 | int * |
| 809 | __xmlLineNumbersDefaultValue(void) { |
| 810 | if (IS_MAIN_THREAD) |
| 811 | return (&xmlLineNumbersDefaultValue); |
| 812 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 813 | return (&xmlGetGlobalState()->xmlLineNumbersDefaultValue); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 814 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 815 | int xmlThrDefLineNumbersDefaultValue(int v) { |
| 816 | int ret; |
| 817 | xmlMutexLock(xmlThrDefMutex); |
| 818 | ret = xmlLineNumbersDefaultValueThrDef; |
| 819 | xmlLineNumbersDefaultValueThrDef = v; |
| 820 | xmlMutexUnlock(xmlThrDefMutex); |
| 821 | return ret; |
| 822 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 823 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 824 | #undef xmlLoadExtDtdDefaultValue |
| 825 | int * |
| 826 | __xmlLoadExtDtdDefaultValue(void) { |
| 827 | if (IS_MAIN_THREAD) |
| 828 | return (&xmlLoadExtDtdDefaultValue); |
| 829 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 830 | return (&xmlGetGlobalState()->xmlLoadExtDtdDefaultValue); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 831 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 832 | int xmlThrDefLoadExtDtdDefaultValue(int v) { |
| 833 | int ret; |
| 834 | xmlMutexLock(xmlThrDefMutex); |
| 835 | ret = xmlLoadExtDtdDefaultValueThrDef; |
| 836 | xmlLoadExtDtdDefaultValueThrDef = v; |
| 837 | xmlMutexUnlock(xmlThrDefMutex); |
| 838 | return ret; |
| 839 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 840 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 841 | #undef xmlParserDebugEntities |
| 842 | int * |
| 843 | __xmlParserDebugEntities(void) { |
| 844 | if (IS_MAIN_THREAD) |
| 845 | return (&xmlParserDebugEntities); |
| 846 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 847 | return (&xmlGetGlobalState()->xmlParserDebugEntities); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 848 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 849 | int xmlThrDefParserDebugEntities(int v) { |
| 850 | int ret; |
| 851 | xmlMutexLock(xmlThrDefMutex); |
| 852 | ret = xmlParserDebugEntitiesThrDef; |
| 853 | xmlParserDebugEntitiesThrDef = v; |
| 854 | xmlMutexUnlock(xmlThrDefMutex); |
| 855 | return ret; |
| 856 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 857 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 858 | #undef xmlParserVersion |
| 859 | const char * * |
| 860 | __xmlParserVersion(void) { |
| 861 | if (IS_MAIN_THREAD) |
| 862 | return (&xmlParserVersion); |
| 863 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 864 | return (&xmlGetGlobalState()->xmlParserVersion); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 865 | } |
| 866 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 867 | #undef xmlPedanticParserDefaultValue |
| 868 | int * |
| 869 | __xmlPedanticParserDefaultValue(void) { |
| 870 | if (IS_MAIN_THREAD) |
| 871 | return (&xmlPedanticParserDefaultValue); |
| 872 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 873 | return (&xmlGetGlobalState()->xmlPedanticParserDefaultValue); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 874 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 875 | int xmlThrDefPedanticParserDefaultValue(int v) { |
| 876 | int ret; |
| 877 | xmlMutexLock(xmlThrDefMutex); |
| 878 | ret = xmlPedanticParserDefaultValueThrDef; |
| 879 | xmlPedanticParserDefaultValueThrDef = v; |
| 880 | xmlMutexUnlock(xmlThrDefMutex); |
| 881 | return ret; |
| 882 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 883 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 884 | #undef xmlSaveNoEmptyTags |
| 885 | int * |
| 886 | __xmlSaveNoEmptyTags(void) { |
| 887 | if (IS_MAIN_THREAD) |
| 888 | return (&xmlSaveNoEmptyTags); |
| 889 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 890 | return (&xmlGetGlobalState()->xmlSaveNoEmptyTags); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 891 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 892 | int xmlThrDefSaveNoEmptyTags(int v) { |
| 893 | int ret; |
| 894 | xmlMutexLock(xmlThrDefMutex); |
| 895 | ret = xmlSaveNoEmptyTagsThrDef; |
| 896 | xmlSaveNoEmptyTagsThrDef = v; |
| 897 | xmlMutexUnlock(xmlThrDefMutex); |
| 898 | return ret; |
| 899 | } |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 900 | |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 901 | #undef xmlSubstituteEntitiesDefaultValue |
| 902 | int * |
| 903 | __xmlSubstituteEntitiesDefaultValue(void) { |
| 904 | if (IS_MAIN_THREAD) |
| 905 | return (&xmlSubstituteEntitiesDefaultValue); |
| 906 | else |
Daniel Veillard | d046356 | 2001-10-13 09:15:48 +0000 | [diff] [blame] | 907 | return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultValue); |
Daniel Veillard | b847864 | 2001-10-12 17:29:10 +0000 | [diff] [blame] | 908 | } |
Daniel Veillard | 781ac8b | 2003-05-15 22:11:36 +0000 | [diff] [blame] | 909 | int xmlThrDefSubstituteEntitiesDefaultValue(int v) { |
| 910 | int ret; |
| 911 | xmlMutexLock(xmlThrDefMutex); |
| 912 | ret = xmlSubstituteEntitiesDefaultValueThrDef; |
| 913 | xmlSubstituteEntitiesDefaultValueThrDef = v; |
| 914 | xmlMutexUnlock(xmlThrDefMutex); |
| 915 | return ret; |
| 916 | } |
Daniel Veillard | 5335dc5 | 2003-01-01 20:59:38 +0000 | [diff] [blame] | 917 | |
| 918 | #undef xmlRegisterNodeDefaultValue |
| 919 | xmlRegisterNodeFunc * |
| 920 | __xmlRegisterNodeDefaultValue(void) { |
| 921 | if (IS_MAIN_THREAD) |
| 922 | return (&xmlRegisterNodeDefaultValue); |
| 923 | else |
| 924 | return (&xmlGetGlobalState()->xmlRegisterNodeDefaultValue); |
| 925 | } |
| 926 | |
| 927 | #undef xmlDeregisterNodeDefaultValue |
| 928 | xmlDeregisterNodeFunc * |
| 929 | __xmlDeregisterNodeDefaultValue(void) { |
| 930 | if (IS_MAIN_THREAD) |
| 931 | return (&xmlDeregisterNodeDefaultValue); |
| 932 | else |
| 933 | return (&xmlGetGlobalState()->xmlDeregisterNodeDefaultValue); |
| 934 | } |