Chai::add_global was added
Just a modification of the add_global_const. I don't see the point in limiting the user to binding only constants to the global scope if the user wishes to have a thread safe mutable object as a global. This was my case anyway.
This commit is contained in:
@@ -446,6 +446,12 @@ namespace chaiscript
|
||||
return *this;
|
||||
}
|
||||
|
||||
ChaiScript &add_global(const Boxed_Value &t_bv, const std::string &t_name)
|
||||
{
|
||||
m_engine.add_global(t_bv, t_name);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// \brief Represents the current state of the ChaiScript system. State and be saved and restored
|
||||
/// \sa ChaiScript::get_state
|
||||
/// \sa ChaiScript::set_state
|
||||
|
Reference in New Issue
Block a user