Mercurial > hg > octave-terminal
changeset 7589:90fb25a5a3fa
minor cleanup in octave_user_function constructor
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 13 Mar 2008 13:22:00 -0400 |
parents | cbedf652a752 |
children | 780cf056eb85 |
files | src/ChangeLog src/ov-usr-fcn.cc |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-03-13 John W. Eaton <jwe@octave.org> + * ov-usr-fcn.cc (octave_user_function::octave_user_function): + Handle num_named_args in initialization list instead of functinon body. + * octave.gperf: Eliminate varargin and varargout keywords. * lex.l (is_keyword_token): Eliminate varargin_kw and varargout_kw from switch statement.
--- a/src/ov-usr-fcn.cc +++ b/src/ov-usr-fcn.cc @@ -101,14 +101,12 @@ lead_comm (), trail_comm (), file_name (), parent_name (), t_parsed (static_cast<time_t> (0)), t_checked (static_cast<time_t> (0)), - system_fcn_file (false), call_depth (0), num_named_args (0), + system_fcn_file (false), call_depth (0), + num_named_args (param_list ? param_list->length () : 0), nested_function (false), inline_function (false), class_constructor (false), class_method (false), xdispatch_class (), args_passed (), num_args_passed (0), local_scope (sid) -{ - if (param_list) - num_named_args = param_list->length (); -} +{ } octave_user_function::~octave_user_function (void) {