ChaiScript can only support static in non-threading mode

This commit is contained in:
Jason Turner 2017-05-31 14:09:07 -06:00
parent 3b48983bc2
commit bdd0a12bb7
3 changed files with 10 additions and 1 deletions

View File

@ -15,6 +15,9 @@ chaiscript::ChaiScript chai; // loads stdlib from loadable module on file system
chaiscript::ChaiScript chai(chaiscript::Std_Lib::library()); // compiles in stdlib chaiscript::ChaiScript chai(chaiscript::Std_Lib::library()); // compiles in stdlib
``` ```
Note that ChaiScript cannot be used as a global / static object unless it is being compiled with `CHAISCRIPT_NO_THREADS`.
# Adding Things To The Engine # Adding Things To The Engine
## Adding a Function / Method / Member ## Adding a Function / Method / Member

View File

@ -144,7 +144,7 @@ namespace chaiscript
class Thread_Storage class Thread_Storage
{ {
public: public:
explicit Thread_Storage(void *) explicit Thread_Storage()
{ {
} }

View File

@ -1,3 +1,9 @@
#define CHAISCRIPT_NO_THREADS
/// ChaiScript as a static is unsupported with thread support enabled
///
#include <chaiscript/chaiscript.hpp> #include <chaiscript/chaiscript.hpp>
static chaiscript::ChaiScript chai; static chaiscript::ChaiScript chai;