Mercurial > octave
diff libinterp/corefcn/variables.cc @ 27016:9b261300a001
move file-scope static autoload map variable and functions to evaluator
* interpreter.h, interpreter.cc (interpreter::autoloaded_functions):
New function.
* pt-eval.h, pt-eval.cc (tree_evaluator::m_autoload_map): New member
variable, replaces static file-scope variable in oct-parse.yy.
(tree_evaluator::get_autoload_map, tree_evaluator::lookup_autoload,
tree_evaluator::autoloaded_functions, tree_evaluator::add_autoload,
tree_evaluator::reverse_lookup_autoload,
tree_evaluator::remove_autoload): New functions, replace similar
global and file-scope static functions in oct-parse.yy. Change all uses.
(check_autoload_file): New function.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 01 Apr 2019 11:15:06 +0000 |
parents | f07542e3a9b9 |
children | 6b0c61a5a0f0 |
line wrap: on
line diff
--- a/libinterp/corefcn/variables.cc Sun Mar 31 20:50:10 2019 +0000 +++ b/libinterp/corefcn/variables.cc Mon Apr 01 11:15:06 2019 +0000 @@ -61,6 +61,7 @@ #include "ov-usr-fcn.h" #include "pager.h" #include "parse.h" +#include "pt-eval.h" #include "syminfo.h" #include "symtab.h" #include "sysdep.h" @@ -243,7 +244,9 @@ if (search_any || search_file || search_dir) { - std::string file_name = octave::lookup_autoload (name); + octave::tree_evaluator& tw = interp.get_evaluator (); + + std::string file_name = tw.lookup_autoload (name); if (file_name.empty ()) {