Only share const globals between threads. Require all globals to be const.

This commit is contained in:
Jason Turner
2009-11-11 05:47:54 +00:00
parent 07352a16a3
commit cca477dae6
4 changed files with 41 additions and 13 deletions

View File

@@ -333,9 +333,9 @@ namespace chaiscript
/**
* Adds a shared object, that can be used by all threads, to the system
*/
ChaiScript_System &add_shared_object(const Boxed_Value &bv, const std::string &name)
ChaiScript_System &add_global_const(const Boxed_Value &bv, const std::string &name)
{
engine.add_shared_object(bv, name);
engine.add_global_const(bv, name);
return *this;
}