Mercurial > hg > octave-max
changeset 7200:12a12ef1f1bc
[project @ 2007-11-27 05:51:46 by jwe]
author | jwe |
---|---|
date | Tue, 27 Nov 2007 05:51:46 +0000 |
parents | cd6ceb8cbf09 |
children | 76341ffda11e |
files | src/ChangeLog src/pt-idx.cc |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-11-27 John W. Eaton <jwe@octave.org> + + * pt-idx.cc (tree_index_expression::lvalue): Treat object == [] + the same as undefined. + 2007-11-26 John W. Eaton <jwe@octave.org> * oct-stream.cc (DO_DOUBLE_CONV): Always use long.
--- a/src/pt-idx.cc +++ b/src/pt-idx.cc @@ -513,7 +513,9 @@ retval.numel (nel); } - else if (first_retval_object.is_defined ()) + else if (first_retval_object.is_defined () + && ! (first_retval_object.is_real_matrix () + && first_retval_object.is_zero_by_zero ())) { octave_value_list tmp_list = first_retval_object.subsref (ttype, idx, 1); @@ -530,7 +532,9 @@ } else { - if (first_retval_object.is_defined ()) + if (first_retval_object.is_defined () + && ! (first_retval_object.is_real_matrix () + && first_retval_object.is_zero_by_zero ())) retval.numel (first_retval_object.numel ()); else retval.numel (1); @@ -542,7 +546,9 @@ if (! have_new_struct_field) { - if (i > 0 && first_retval_object.is_defined ()) + if (i > 0 && first_retval_object.is_defined () + && ! (first_retval_object.is_real_matrix () + && first_retval_object.is_zero_by_zero ())) { std::string ttype = type.substr (0, i);