Applied the last patches from Gary, cleanup, activated threading all user
* include/libxml/SAX.h include/libxml/globals.h include/libxml/parser.h
include/libxml/parserInternals.h include/libxml/tree.h
include/libxml/xmlerror.h HTMLparser.c SAX.c error.c globals.c
nanoftp.c nanohttp.c parser.c parserInternals.c testDocbook.c
testHTML.c testSAX.c tree.c uri.c xlink.c xmlmemory.c:
Applied the last patches from Gary, cleanup, activated threading
all user accessible global variables are now handled in globals.[ch]
Still a bit rought but make tests passes with either
--with-threads defined at configure time or not.
* Makefile.am example/Makefile.am: added globals.[ch] and threads
linking options
Daniel
diff --git a/include/libxml/xmlerror.h b/include/libxml/xmlerror.h
index 5b43734..aa5078f 100644
--- a/include/libxml/xmlerror.h
+++ b/include/libxml/xmlerror.h
@@ -2,6 +2,7 @@
#define __XML_ERROR_H__
#include <libxml/parser.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -144,18 +145,12 @@
typedef void (*xmlGenericErrorFunc) (void *ctx, const char *msg, ...);
/*
- * Those are the default error function and associated context to use
- * when when there is an error and no parsing or validity context available
- */
-
-LIBXML_DLL_IMPORT extern xmlGenericErrorFunc xmlGenericError;
-LIBXML_DLL_IMPORT extern void *xmlGenericErrorContext;
-
-/*
- * Use the following function to reset the two previous global variables.
+ * Use the following function to reset the two global variables
+ * xmlGenericError and xmlGenericErrorContext.
*/
void xmlSetGenericErrorFunc (void *ctx,
xmlGenericErrorFunc handler);
+void initGenericErrorDefaultFunc(xmlGenericErrorFunc *handler);
/*
* Default message routines used by SAX and Valid context for error