Mercurial > hg > octave-lyh
changeset 9333:3930f8ce6430
Unpack cs-list and setup nargin for call to subsasgn method
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 11 Jun 2009 12:44:01 +0200 |
parents | bf6da2fbfa4e |
children | 4f96a7770492 |
files | src/ChangeLog src/ov-class.cc |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,9 @@ 2009-06-11 Jaroslav Hajek <highegg@gmail.com> - * ov-class.cc (subsref): Set up proper nargout for call to subsref + * ov-class.cc (octave_class::subsref): Set up proper nargout for call to subsref method. + * ov-class.cc (octave_class::subsref): Unpack cs-list and setup nargin + for call to subsasgn. 2009-06-10 Jaroslav Hajek <highegg@gmail.com>
--- a/src/ov-class.cc +++ b/src/ov-class.cc @@ -513,7 +513,15 @@ { octave_value_list args; - args(2) = rhs; + if (rhs.is_cs_list ()) + { + octave_value_list lrhs = rhs.list_value (); + args.resize (2 + lrhs.length ()); + for (octave_idx_type i = 0; i < lrhs.length (); i++) + args(2+i) = lrhs(i); + } + else + args(2) = rhs; args(1) = make_idx_args (type, idx, "subsasgn");