Mercurial > octave
diff libinterp/corefcn/symtab.h @ 21264:dfce76507f4b
Fix dbstop to find subfuncs of old-style class methods (bug #34804).
* symtab.cc (find_submethod): New function to find subfunc in old-style class
method.
* symtab.h (find_method): Call find_submethod if function exists but not found
through find_method.
* symtab.h (find_submethod): Prototype for new function.
author | Lachlan <lachlanbis@gmail.com> |
---|---|
date | Mon, 15 Feb 2016 14:03:23 -0800 |
parents | 1473547f50f5 |
children | ae4d7dfea337 |
line wrap: on
line diff
--- a/libinterp/corefcn/symtab.h Mon Feb 15 11:04:52 2016 -0800 +++ b/libinterp/corefcn/symtab.h Mon Feb 15 14:03:23 2016 -0800 @@ -1497,13 +1497,23 @@ fcn_table_const_iterator p = fcn_table.find (name); if (p != fcn_table.end ()) - return p->second.find_method (dispatch_type); + { + octave_value fcn = p->second.find_method (dispatch_type); + + if (! fcn.is_defined ()) + fcn = find_submethod (name, dispatch_type); + + return fcn; + } else { fcn_info finfo (name); octave_value fcn = finfo.find_method (dispatch_type); + if (! fcn.is_defined ()) + fcn = find_submethod (name, dispatch_type); + if (fcn.is_defined ()) fcn_table[name] = finfo; @@ -1512,6 +1522,9 @@ } static octave_value + find_submethod (const std::string& name, const std::string& dispatch_type); + + static octave_value find_built_in_function (const std::string& name) { fcn_table_const_iterator p = fcn_table.find (name);