Cleanup (indentation, comments) for non-const global support
@Zoomulator - I pulled in your non-const global commits.
This commit is contained in:
parent
d5fef3121a
commit
a26d628e5c
@ -478,6 +478,9 @@ namespace chaiscript
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a new global (non-const) shared object, between all the threads
|
||||
*/
|
||||
void add_global(const Boxed_Value &obj, const std::string &name)
|
||||
{
|
||||
validate_object_name(name);
|
||||
|
@ -454,6 +454,11 @@ namespace chaiscript
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// \brief Adds a mutable object that is available in all contexts and to all threads
|
||||
/// \param[in] t_bv Boxed_Value to add as a global
|
||||
/// \param[in] t_name Name of the value to add
|
||||
/// \warning The user is responsible for making sure the object is thread-safe if necessary
|
||||
/// ChaiScript is thread-safe but provides no threading locking mechanism to the script
|
||||
ChaiScript &add_global(const Boxed_Value &t_bv, const std::string &t_name)
|
||||
{
|
||||
m_engine.add_global(t_bv, t_name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user