diff options
author | William M. Brack <wbrack@src.gnome.org> | 2004-01-04 01:01:14 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2004-01-04 01:01:14 +0000 |
commit | 9202942ba3f83882eaa1012717384b4851e69f3e (patch) | |
tree | 567ecb6f351aa2c898198ad2f03f6f16a09b8d3a /xmlmemory.c | |
parent | d34b0b8fb82dd24123b73dff1b9e4966bf4b41d2 (diff) | |
download | libxml2-9202942ba3f83882eaa1012717384b4851e69f3e.tar.gz |
applied suggestion from Miloslav Trmac (see Bug 130419) and eliminated
* xmlmemory.c: applied suggestion from Miloslav Trmac (see
Bug 130419) and eliminated xmlInitMemoryDone. More
improvement needed.
* xml2-config.in: added an additional flag (--exec-prefix) to
allow library directory to be different from include directory
(Bug 129558).
Diffstat (limited to 'xmlmemory.c')
-rw-r--r-- | xmlmemory.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xmlmemory.c b/xmlmemory.c index 55831d72..ccd8f55b 100644 --- a/xmlmemory.c +++ b/xmlmemory.c @@ -769,8 +769,6 @@ xmlMemoryDump(void) * * ****************************************************************/ -static int xmlInitMemoryDone = 0; - /** * xmlInitMemory: * @@ -784,9 +782,12 @@ xmlInitMemory(void) #ifdef HAVE_STDLIB_H char *breakpoint; #endif - + /* + This is really not good code (see Bug 130419). Suggestions for + improvement will be welcome! + */ + if (xmlMemInitialized) return(-1); xmlMemInitialized = 1; - if (xmlInitMemoryDone) return(-1); xmlMemMutex = xmlNewMutex(); #ifdef HAVE_STDLIB_H @@ -806,7 +807,6 @@ xmlInitMemory(void) xmlGenericError(xmlGenericErrorContext, "xmlInitMemory() Ok\n"); #endif - xmlInitMemoryDone = 1; return(0); } |