Mercurial > hg > octave-nkf
diff src/ov-fcn-handle.h @ 7651:443a8f5a50fd
require both subsref variants to be defined in octave_value subclasses
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 26 Mar 2008 22:09:42 -0400 |
parents | 745a8299c2b5 |
children | 5adeea5de26c |
line wrap: on
line diff
--- a/src/ov-fcn-handle.h +++ b/src/ov-fcn-handle.h @@ -57,11 +57,11 @@ octave_base_value *clone (void) const { return new octave_fcn_handle (*this); } octave_base_value *empty_clone (void) const { return new octave_fcn_handle (); } - octave_value subsref (const std::string&, - const std::list<octave_value_list>&) + octave_value subsref (const std::string& type, + const std::list<octave_value_list>& idx) { - panic_impossible (); - return octave_value (); + octave_value_list tmp = subsref (type, idx, 1); + return tmp.length () > 0 ? tmp(0) : octave_value (); } octave_value_list subsref (const std::string& type,