Mercurial > hg > octave-lyh
changeset 9775:9d9f858849c7
Allow and ignore extra outargs from user-defined size methods
author | David Grundberg <davidg@cs.umu.se> |
---|---|
date | Tue, 03 Nov 2009 08:49:20 +0100 |
parents | fbf15a0f30f0 |
children | 266eae13dcf3 |
files | src/ChangeLog src/ov-class.cc |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-11-03 David Grundberg <davidg@cs.umu.se> + + * ov-class.cc (octave_class::size): Allow and ignore extra outargs + from user-defined size methods. + 2009-11-03 David Grundberg <davidg@cs.umu.se> * ov-class.cc (make_idx_args): Call user-defined subsref/subsasgn
--- a/src/ov-class.cc +++ b/src/ov-class.cc @@ -306,10 +306,10 @@ octave_value_list args (1, octave_value (this)); octave_value_list lv = feval (meth.function_value (), args, 1); - if (lv.length () == 1 && lv(0).is_matrix_type () && lv(0).dims ().is_vector ()) + if (lv.length () > 0 && lv(0).is_matrix_type () && lv(0).dims ().is_vector ()) retval = lv(0).matrix_value (); else - error ("@%s/size: invalid return value"); + error ("@%s/size: invalid return value", class_name ().c_str ()); } return retval;