Mercurial > hg > octave-terminal
changeset 9792:384616240a8f
fix internal numel on classes
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 10 Nov 2009 10:58:39 +0100 |
parents | 6e425f6be618 |
children | 7161e9b41cf6 |
files | src/ChangeLog src/ov-class.cc |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-11-10 Jaroslav Hajek <highegg@gmail.com> + + * ov-class.cc (octave_class::numel): Use base version if called from + built-in assignment. + (octave_class::size): Ditto. + 2009-11-10 Jaroslav Hajek <highegg@gmail.com> * DLD-FUNCTIONS/max.cc (Fcummin, Fcummax): Simplify examples in docs.
--- a/src/ov-class.cc +++ b/src/ov-class.cc @@ -297,6 +297,9 @@ Matrix octave_class::size (void) { + if (in_class_method () || called_from_builtin ()) + return octave_base_value::size (); + Matrix retval (1, 2, 1.0); octave_value meth = symbol_table::find_method ("size", class_name ()); @@ -318,6 +321,9 @@ octave_idx_type octave_class::numel (const octave_value_list& idx) { + if (in_class_method () || called_from_builtin ()) + return octave_base_value::numel (idx); + octave_idx_type retval = -1; const std::string cn = class_name ();