aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-25 00:27:23 +0000
committerlloyd <[email protected]>2010-06-25 00:27:23 +0000
commit9caa9772727a14a81a4d8a00d9a86d3067f95a43 (patch)
treeb94764c978a8cf1fc83e4096a4f58d4828349ac8 /src/libstate
parent2eadf49b54630897ab66bb382640b4427beb1744 (diff)
If we are going to lazily initialize, just create the type and call
its constructor directly, instead of going through LibraryInitializer.
Diffstat (limited to 'src/libstate')
-rw-r--r--src/libstate/libstate.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp
index 1a980b95f..c7d2bb161 100644
--- a/src/libstate/libstate.cpp
+++ b/src/libstate/libstate.cpp
@@ -8,7 +8,6 @@
#include <botan/libstate.h>
#include <botan/charset.h>
#include <botan/engine.h>
-#include <botan/init.h>
#include <botan/internal/defalloc.h>
#include <botan/internal/default_engine.h>
#include <botan/internal/mutex.h>
@@ -77,7 +76,10 @@ Library_State& global_state()
on or memory might leak.
*/
if(!global_lib_state)
- LibraryInitializer::initialize("thread_safe=true");
+ {
+ global_lib_state = new Library_State;
+ global_lib_state->initialize(true);
+ }
return (*global_lib_state);
}