mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
ChaiScript can only support static in non-threading mode
This commit is contained in:
parent
3b48983bc2
commit
bdd0a12bb7
@ -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
|
||||||
|
|||||||
@ -144,7 +144,7 @@ namespace chaiscript
|
|||||||
class Thread_Storage
|
class Thread_Storage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Thread_Storage(void *)
|
explicit Thread_Storage()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user