/*
* Internal data for random function, protected by xmlDictMutex
*/
-unsigned int rand_seed = 0;
+static unsigned int rand_seed = 0;
#endif
#endif
* xmlInitializeDict:
*
* Do the dictionary mutex initialization.
- * this function is not thread safe, initialization should
- * preferably be done once at startup
+ * this function is deprecated
*
* Returns 0 if initialization was already done, and 1 if that
* call led to the initialization
*/
int xmlInitializeDict(void) {
+ return(0);
+}
+
+/**
+ * __xmlInitializeDict:
+ *
+ * This function is not public
+ * Do the dictionary mutex initialization.
+ * this function is not thread safe, initialization should
+ * normally be done once at setup when called from xmlOnceInit()
+ * we may also land in this code if thread support is not compiled in
+ *
+ * Returns 0 if initialization was already done, and 1 if that
+ * call led to the initialization
+ */
+int __xmlInitializeDict(void) {
if (xmlDictInitialized)
return(1);
int ret;
if (xmlDictInitialized == 0)
- xmlInitializeDict();
+ __xmlInitializeDict();
xmlRMutexLock(xmlDictMutex);
#ifdef HAVE_RAND_R
xmlDictPtr dict;
if (!xmlDictInitialized)
- if (!xmlInitializeDict())
+ if (!__xmlInitializeDict())
return(NULL);
#ifdef DICT_DEBUG_PATTERNS
int
xmlDictReference(xmlDictPtr dict) {
if (!xmlDictInitialized)
- if (!xmlInitializeDict())
+ if (!__xmlInitializeDict())
return(-1);
if (dict == NULL) return -1;
return;
if (!xmlDictInitialized)
- if (!xmlInitializeDict())
+ if (!__xmlInitializeDict())
return;
/* decrement the counter, it may be shared by a parser and docs */