diff options
author | lloyd <[email protected]> | 2006-06-24 00:22:58 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-06-24 00:22:58 +0000 |
commit | 0f5b4a6a3460e2ad24b055bdc2bc5fd33ed35b0f (patch) | |
tree | 04335ce283a90c7eece02e3c2b26a9f437acba34 /src | |
parent | de6cfdef42515053d7396e512cc1370ee75a80e4 (diff) |
Add a swap_global_state, to allow the use of multiple
simultaneous library states.
Diffstat (limited to 'src')
-rw-r--r-- | src/libstate.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstate.cpp b/src/libstate.cpp index 581345f76..2b7636cdf 100644 --- a/src/libstate.cpp +++ b/src/libstate.cpp @@ -34,6 +34,13 @@ void set_global_state(Library_State* new_state) global_lib_state = new_state; } +Library_State* swap_global_state(Library_State* new_state) + { + Library_State* old_state = global_lib_state; + global_lib_state = new_state; + return old_state; + } + namespace { /************************************************* @@ -342,3 +349,4 @@ Library_State::~Library_State() } } +n |