diff options
author | Wang Lam <wlam@kosmix.com> | 2009-08-24 17:34:25 +0200 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2009-08-24 17:34:25 +0200 |
commit | 1de382eb061b70b07040b3932c4b6082eb3ded79 (patch) | |
tree | 1d4c31db225e65503e665d757e32137139c945cd /include | |
parent | c78988acb7b9b629ddae4f758d78f163ca6df532 (diff) | |
download | android_external_libxml2-1de382eb061b70b07040b3932c4b6082eb3ded79.tar.gz android_external_libxml2-1de382eb061b70b07040b3932c4b6082eb3ded79.tar.bz2 android_external_libxml2-1de382eb061b70b07040b3932c4b6082eb3ded79.zip |
Fix SetGenericErrorFunc and SetStructured clash
* include/libxml/globals.h globals.c global.data: define a new global
variable (per thread) for structured error reporting, to not conflict
with generic one
* error.c: when defined use the structured error report over any generic
one
Diffstat (limited to 'include')
-rw-r--r-- | include/libxml/globals.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/libxml/globals.h b/include/libxml/globals.h index 57e25fa5..e74e1b15 100644 --- a/include/libxml/globals.h +++ b/include/libxml/globals.h @@ -76,6 +76,7 @@ XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc #undef xmlGenericError #undef xmlStructuredError #undef xmlGenericErrorContext +#undef xmlStructuredErrorContext #undef xmlGetWarningsDefaultValue #undef xmlIndentTreeOutput #undef xmlTreeIndentString @@ -158,6 +159,8 @@ struct _xmlGlobalState xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; + + void *xmlStructuredErrorContext; }; #ifdef __cplusplus @@ -354,6 +357,14 @@ XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void); XMLPUBVAR void * xmlGenericErrorContext; #endif +XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void); +#ifdef LIBXML_THREAD_ENABLED +#define xmlStructuredErrorContext \ +(*(__xmlStructuredErrorContext())) +#else +LIBXML_DLL_IMPORT extern void * xmlStructuredErrorContext; +#endif + XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void); #ifdef LIBXML_THREAD_ENABLED #define xmlGetWarningsDefaultValue \ |