Add ability to disable loading external files

* Options are passed to ChaiScript constructor
 * load_module / eval_file / use can be disabled
   from script context
This commit is contained in:
Jason Turner
2016-10-17 20:51:15 -06:00
parent c97a69537d
commit 7d9e1b3af7
6 changed files with 395 additions and 190 deletions

View File

@@ -827,11 +827,12 @@ namespace chaiscript
{
public:
ChaiScript(std::vector<std::string> t_modulepaths = {},
std::vector<std::string> t_usepaths = {})
std::vector<std::string> t_usepaths = {},
const std::vector<Options> &t_opts)
: ChaiScript_Basic(
chaiscript::Std_Lib::library(),
std::make_unique<parser::ChaiScript_Parser<eval::Noop_Tracer, optimizer::Optimizer_Default>>(),
t_modulepaths, t_usepaths)
t_modulepaths, t_usepaths, t_opts)
{
}
};