Mercurial > octave
comparison libinterp/corefcn/defun.cc @ 31105:670a0d878af1
eliminate WHO arguments from interpreter-private functions
* interpreter-private.h, inpterpreter-private.cc (__get_interpreter__,
__get_dynamic_loader__, __get_error_system__, __get_gh_manager__,
__get_help_system__, __get_input_system__, __get_load_path__,
__get_load_save_system__, __get_event_manager__,
__get_output_system__, __get_type_info__, __get_symbol_table__,
__get_current_scope__, __require_current_scope__, __get_evaluator__,
__get_bp_table__, __get_child_list__, __get_cdef_manager__,
__get_display_info__, __get_gtk_manager__): Eliminate WHO argument.
Previously, it was never displayed by __get_interpreter__. And, as
pointed out by Petter Tomner in patch #10216, passing a std::string
object could have performance issues.
(__get_interpreter__): Eliminate useless call to error. Display
message to std::cerr then abort.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 22 Jun 2022 12:48:59 -0400 |
parents | 796f54d4ddbf |
children | e88a07dec498 |
comparison
equal
deleted
inserted
replaced
31104:90549b20fb28 | 31105:670a0d878af1 |
---|---|
52 | 52 |
53 // Print the usage part of the doc string of FCN (user-defined or DEFUN). | 53 // Print the usage part of the doc string of FCN (user-defined or DEFUN). |
54 void | 54 void |
55 print_usage (void) | 55 print_usage (void) |
56 { | 56 { |
57 tree_evaluator& tw = __get_evaluator__ ("print_usage"); | 57 tree_evaluator& tw = __get_evaluator__ (); |
58 | 58 |
59 const octave_function *cur = tw.current_function (); | 59 const octave_function *cur = tw.current_function (); |
60 | 60 |
61 if (cur) | 61 if (cur) |
62 print_usage (cur->name ()); | 62 print_usage (cur->name ()); |
95 if (relative) | 95 if (relative) |
96 fcn->mark_relative (); | 96 fcn->mark_relative (); |
97 | 97 |
98 octave_value fval (fcn); | 98 octave_value fval (fcn); |
99 | 99 |
100 symbol_table& symtab = __get_symbol_table__ ("install_dld_function"); | 100 symbol_table& symtab = __get_symbol_table__ (); |
101 | 101 |
102 symtab.install_built_in_function (name, fval); | 102 symtab.install_built_in_function (name, fval); |
103 } | 103 } |
104 | 104 |
105 void | 105 void |
112 if (relative) | 112 if (relative) |
113 fcn->mark_relative (); | 113 fcn->mark_relative (); |
114 | 114 |
115 octave_value fval (fcn); | 115 octave_value fval (fcn); |
116 | 116 |
117 symbol_table& symtab = __get_symbol_table__ ("install_dld_function"); | 117 symbol_table& symtab = __get_symbol_table__ (); |
118 | 118 |
119 symtab.install_built_in_function (name, fval); | 119 symtab.install_built_in_function (name, fval); |
120 } | 120 } |
121 | 121 |
122 void | 122 void |
128 if (relative) | 128 if (relative) |
129 fcn->mark_relative (); | 129 fcn->mark_relative (); |
130 | 130 |
131 octave_value fval (fcn); | 131 octave_value fval (fcn); |
132 | 132 |
133 symbol_table& symtab = __get_symbol_table__ ("install_mex_function"); | 133 symbol_table& symtab = __get_symbol_table__ (); |
134 | 134 |
135 symtab.install_built_in_function (name, fval); | 135 symtab.install_built_in_function (name, fval); |
136 } | 136 } |
137 | 137 |
138 dynamic_library | 138 dynamic_library |
139 get_current_shlib (void) | 139 get_current_shlib (void) |
140 { | 140 { |
141 dynamic_library retval; | 141 dynamic_library retval; |
142 | 142 |
143 tree_evaluator& tw = __get_evaluator__ ("get_current_shlib"); | 143 tree_evaluator& tw = __get_evaluator__ (); |
144 | 144 |
145 octave_function *curr_fcn = tw.current_function (); | 145 octave_function *curr_fcn = tw.current_function (); |
146 | 146 |
147 if (curr_fcn) | 147 if (curr_fcn) |
148 { | 148 { |