Mercurial > hg > octave-avbm
changeset 6591:fc0218995ee7
[project @ 2007-04-27 02:17:34 by jwe]
author | jwe |
---|---|
date | Fri, 27 Apr 2007 02:17:34 +0000 |
parents | 1f466adecafd |
children | 8899e24ae362 |
files | src/ChangeLog src/ov-usr-fcn.cc |
diffstat | 2 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-04-26 John W. Eaton <jwe@octave.org> + + * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): + Only deal with varargout if ret_list->takes_varargs () is true. + 2007-04-26 Soren Hauberg <soren@hauberg.org> * DLD-FUNCTIONS/urlwrite.cc: Doc fix.
--- a/src/ov-usr-fcn.cc +++ b/src/ov-usr-fcn.cc @@ -381,16 +381,19 @@ Cell varargout; - symbol_record *sr = local_sym_tab->lookup ("varargout"); - - if (sr && sr->is_variable ()) + if (ret_list->takes_varargs ()) { - octave_value v = sr->def (); + symbol_record *sr = local_sym_tab->lookup ("varargout"); + + if (sr && sr->is_variable ()) + { + octave_value v = sr->def (); - varargout = v.cell_value (); + varargout = v.cell_value (); - if (error_state) - error ("expecting varargout to be a cell array object"); + if (error_state) + error ("expecting varargout to be a cell array object"); + } } if (! error_state)