Reduce cost of including chaiscript.hpp

- ChaiScript no longer includes or automatically instantiates std lib
 - ChaiScript constructor now requires an std lib instance in the form
   of a ModulePtr object
 - This new layout facilitates better usage of compilation firewalls and
   factories for reducing the overall impact of ChaiScript on a project
This commit is contained in:
Jason Turner
2011-12-27 21:37:00 -07:00
parent 9a9d4e1ae0
commit 136b877afa
20 changed files with 72 additions and 56 deletions

View File

@@ -263,6 +263,12 @@ namespace chaiscript
return m_data->m_const_data_ptr;
}
/// \returns true if the two Boxed_Values share the same internal type
static bool type_match(Boxed_Value l, Boxed_Value r)
{
return l.get_type_info() == r.get_type_info();
}
private:
std::shared_ptr<Data> m_data;
};
@@ -361,11 +367,6 @@ namespace chaiscript
/// \returns true if the two Boxed_Values share the same internal type
static bool type_match(Boxed_Value l, Boxed_Value r)
{
return l.get_type_info() == r.get_type_info();
}
}
#endif