Mercurial > octave-nkf
diff src/symtab.cc @ 8162:293c4b5fe33d
symtab.cc (symbol_table::fcn_info::fcn_info_rep::load_class_method): Call load_class_constructor if name and dispatch_type are the same.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 29 Sep 2008 18:16:57 -0400 |
parents | 64f1cd525656 |
children | 188d38a553c7 |
line wrap: on
line diff
--- a/src/symtab.cc Mon Sep 29 18:08:53 2008 -0400 +++ b/src/symtab.cc Mon Sep 29 18:16:57 2008 -0400 @@ -339,20 +339,26 @@ { octave_value retval; - std::string dir_name; - - std::string file_name = load_path::find_method (dispatch_type, name, dir_name); - - if (! file_name.empty ()) + if (name == dispatch_type) + retval = load_class_constructor (); + else { - octave_function *fcn = load_fcn_from_file (file_name, dir_name, - dispatch_type); + std::string dir_name; + + std::string file_name = load_path::find_method (dispatch_type, name, + dir_name); - if (fcn) + if (! file_name.empty ()) { - retval = octave_value (fcn); + octave_function *fcn = load_fcn_from_file (file_name, dir_name, + dispatch_type); - class_methods[dispatch_type] = retval; + if (fcn) + { + retval = octave_value (fcn); + + class_methods[dispatch_type] = retval; + } } }