Allow "Module" to contain chaiscript snippets to be executed when a module is initialized. Update dynamic_object to use the new feature to clean up some of the _prelude.hpp

This commit is contained in:
Jason Turner
2009-09-21 03:07:01 +00:00
parent 8241e46680
commit 50eace16da
5 changed files with 34 additions and 21 deletions

View File

@@ -52,7 +52,7 @@ namespace chaiscript
{
try {
const Dynamic_Object &d = boxed_cast<const Dynamic_Object &>(bvs[0]);
return d.get_type_name() == name;
return name == "Dynamic_Object" || d.get_type_name() == name;
} catch (const std::bad_cast &) {
if (ti)
{