Mercurial > hg > octave-lyh
changeset 4892:7e5370e5c7ee
[project @ 2004-05-07 17:37:47 by jwe]
author | jwe |
---|---|
date | Fri, 07 May 2004 17:37:47 +0000 |
parents | aa7573ddf60f |
children | 1956583b08f7 |
files | src/ChangeLog src/octave.cc src/ov-usr-fcn.cc |
diffstat | 3 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2004-05-07 John W. Eaton <jwe@octave.org> + + * octave.cc (intern_argv): Insert __nargin__ in top_level_sym_tab + instead of making it a builtin variable. Mark it static. + * ov-usr-fcn.cc (install_automatic_vars): Mark local automatic + variables static. + 2004-04-30 John W. Eaton <jwe@octave.org> * oct-stream.cc (octave_base_stream::clearerr): New function.
--- a/src/octave.cc +++ b/src/octave.cc @@ -164,7 +164,11 @@ static void intern_argv (int argc, char **argv) { - bind_builtin_variable ("__nargin__", argc-1, true, true, 0); + symbol_record *nargin_sr = top_level_sym_tab->lookup ("__nargin__", true); + + nargin_sr->mark_as_static (); + + nargin_sr->define (argc-1); Cell args;
--- a/src/ov-usr-fcn.cc +++ b/src/ov-usr-fcn.cc @@ -556,8 +556,15 @@ nargin_sr = sym_tab->lookup ("__nargin__", true); nargout_sr = sym_tab->lookup ("__nargout__", true); + argn_sr->mark_as_static (); + nargin_sr->mark_as_static (); + nargout_sr->mark_as_static (); + if (takes_varargs ()) - varargin_sr = sym_tab->lookup ("varargin", true); + { + varargin_sr = sym_tab->lookup ("varargin", true); + varargin_sr->mark_as_static (); + } } }