diff options
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 |