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:
@@ -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)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user