comparison libinterp/octave-value/ov-classdef.cc @ 31175:2b8e8637a64e

maint: merge stable to default
author Rik <rik@octave.org>
date Wed, 03 Aug 2022 15:44:17 -0700
parents 670a0d878af1 fb1c7c8a030b
children bf6376a754a4
comparison
equal deleted inserted replaced
31173:06dc7fe25322 31175:2b8e8637a64e
744 744
745 cdef_class cls = lookup_class (class_name, false, true); 745 cdef_class cls = lookup_class (class_name, false, true);
746 746
747 if (cls.ok ()) 747 if (cls.ok ())
748 { 748 {
749 // Find methods for classdef objects.
749 std::map<std::string, cdef_method> method_map 750 std::map<std::string, cdef_method> method_map
750 = cls.get_method_map (false, true); 751 = cls.get_method_map (false, true);
751 752
752 std::list<std::string> method_names; 753 std::list<std::string> method_names;
753 754
758 method_names.push_back (nm); 759 method_names.push_back (nm);
759 } 760 }
760 761
761 sv = string_vector (method_names); 762 sv = string_vector (method_names);
762 } 763 }
763 764 else
764 // The following will also find methods for legacy @CLASS objects. 765 {
765 load_path& lp = interp.get_load_path (); 766 // Find methods for legacy @CLASS objects.
766 767 load_path& lp = interp.get_load_path ();
767 sv.append (lp.methods (class_name)); 768
769 sv = string_vector (lp.methods (class_name));
770 }
768 771
769 return ovl (Cell (sv)); 772 return ovl (Cell (sv));
770 } 773 }
771 774
772 OCTAVE_NAMESPACE_END 775 OCTAVE_NAMESPACE_END