comparison libinterp/octave-value/ov-classdef.cc @ 18462:00ba456b9aa8

Fix dispatch class of property accessor methods. * ov-classdef (cdef_class::make_meta_class): Make sure the property accessor methods have the correct dispatch class.
author Michael Goffioul <michael.goffioul@gmail.com>
date Thu, 13 Feb 2014 22:29:44 -0500
parents b0aba84cf80f
children 932aca9a7c57
comparison
equal deleted inserted replaced
18457:3afae1432cd6 18462:00ba456b9aa8
2936 std::map<std::string, octave_value>::iterator git = 2936 std::map<std::string, octave_value>::iterator git =
2937 get_methods.find (prop_name); 2937 get_methods.find (prop_name);
2938 2938
2939 if (git != get_methods.end ()) 2939 if (git != get_methods.end ())
2940 { 2940 {
2941 make_function_of_class (retval, git->second);
2941 prop.put ("GetMethod", git->second); 2942 prop.put ("GetMethod", git->second);
2942 get_methods.erase (git); 2943 get_methods.erase (git);
2943 } 2944 }
2944 2945
2945 std::map<std::string, octave_value>::iterator sit = 2946 std::map<std::string, octave_value>::iterator sit =
2946 set_methods.find (prop_name); 2947 set_methods.find (prop_name);
2947 2948
2948 if (sit != set_methods.end ()) 2949 if (sit != set_methods.end ())
2949 { 2950 {
2951 make_function_of_class (retval, sit->second);
2950 prop.put ("SetMethod", sit->second); 2952 prop.put ("SetMethod", sit->second);
2951 set_methods.erase (sit); 2953 set_methods.erase (sit);
2952 } 2954 }
2953 2955
2954 retval.install_property (prop); 2956 retval.install_property (prop);