Mercurial > octave
changeset 14350:1238163688a0 stable
maint: merge release candidate changesets
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 09 Feb 2012 11:27:08 -0500 |
parents | 06f706e92771 (diff) e9081ee7e714 (current diff) |
children | cb4f1915db92 |
files | |
diffstat | 2 files changed, 21 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/profiler.cc Thu Feb 09 11:25:50 2012 -0500 +++ b/src/profiler.cc Thu Feb 09 11:27:08 2012 -0500 @@ -385,11 +385,11 @@ profile_data_accumulator::query_time (void) const { octave_time now; - // FIXME -- this should be removed at some point... See bug 34210. -#if defined (__CYGWIN__) || defined (__MINGW32__) - volatile -#endif - double dnow = now.double_value (); + + // FIXME -- is this volatile declaration really needed? + // See bug #34210 for additional details. + volatile double dnow = now.double_value (); + return dnow; }
--- a/src/pt-idx.cc Thu Feb 09 11:25:50 2012 -0500 +++ b/src/pt-idx.cc Thu Feb 09 11:27:08 2012 -0500 @@ -177,13 +177,13 @@ static inline octave_value_list make_value_list (tree_argument_list *args, const string_vector& arg_nm, - const octave_value *object) + const octave_value *object, bool rvalue = true) { octave_value_list retval; if (args) { - if (object && args->has_magic_end () && object->is_undefined ()) + if (rvalue && object && args->has_magic_end () && object->is_undefined ()) gripe_invalid_inquiry_subscript (); else retval = args->convert_to_const_vector (object); @@ -476,7 +476,7 @@ case '(': { octave_value_list tidx - = make_value_list (*p_args, *p_arg_nm, &tmp); + = make_value_list (*p_args, *p_arg_nm, &tmp, false); idx.push_back (tidx); @@ -496,7 +496,7 @@ case '{': { octave_value_list tidx - = make_value_list (*p_args, *p_arg_nm, &tmp); + = make_value_list (*p_args, *p_arg_nm, &tmp, false); if (tmp.is_undefined ()) { @@ -601,6 +601,18 @@ /* %!test +%! clear x +%! clear y +%! y = 3; +%! x(y(end)) = 1; +%! assert (x, [0, 0, 1]); +%! clear x +%! clear y +%! y = {3}; +%! x(y{end}) = 1; +%! assert (x, [0, 0, 1]); + +%!test %! x = {1, 2, 3}; %! [x{:}] = deal (4, 5, 6); %! assert (x, {4, 5, 6});