* libxslt/extensions.c libxslt/xslt.c libxslt/xslt.h
libxslt/xsltInternals.h: applied patch from Christopher R. Palmer
to avoid a race condition in xsltInit()
Daniel
+Tue Feb 21 17:59:11 CET 2006 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/extensions.c libxslt/xslt.c libxslt/xslt.h
+ libxslt/xsltInternals.h: applied patch from Christopher R. Palmer
+ to avoid a race condition in xsltInit()
+
Sun Feb 19 22:40:58 CET 2006 Daniel Veillard <daniel@veillard.com>
* doc/xsltproc.1 doc/xsltproc.xml: improvement of the man page
xmlHashFree(xsltModuleHash, NULL);
xsltModuleHash = NULL;
}
+
+ xsltUninit();
}
static void
* Initializes the processor (e.g. registers built-in extensions,
* etc.)
*/
-static void
+
+static int initialized = 0;
+
+void
xsltInit (void) {
- xsltRegisterAllExtras();
+ if (initialized == 0) {
+ initialized = 1;
+ xsltRegisterAllExtras();
+ }
+}
+
+/**
+ * xsltUninit
+ *
+ * Uninitializes the processor.
+ */
+
+void
+xsltUninit (void) {
+ initialized = 0;
}
/**
XSLTPUBVAR const int xsltLibxmlVersion;
/*
+ * Global initialization function.
+ */
+
+XSLTPUBFUN void XSLTCALL
+ xsltInit (void);
+
+/*
* Global cleanup function.
*/
XSLTPUBFUN void XSLTCALL
xmlNodePtr node);
XSLTPUBFUN void XSLTCALL
xsltFreeAVTList (void *avt);
+
+/*
+ * Extra function for successful xsltCleanupGlobals / xsltInit sequence.
+ */
+
+XSLTPUBFUN void XSLTCALL
+ xsltUninit (void);
+
#ifdef __cplusplus
}
#endif