From 0f5b4a6a3460e2ad24b055bdc2bc5fd33ed35b0f Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 24 Jun 2006 00:22:58 +0000 Subject: Add a swap_global_state, to allow the use of multiple simultaneous library states. --- src/libstate.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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 -- cgit v1.2.3