Mercurial > hg > octave-jordi
changeset 11066:e678346a47d9
toplev.cc, sighandlers.cc, utils.cc, octave.cc, pt-eval.cc pt-idx.cc: Octave_map to octave_map and octave_scalar_map conversion
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 30 Sep 2010 06:00:00 -0400 |
parents | 9bf6c927c267 |
children | d7f0d115c10c |
files | src/ChangeLog src/octave.cc src/pt-eval.cc src/pt-idx.cc src/sighandlers.cc src/toplev.cc src/utils.cc |
diffstat | 7 files changed, 28 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2010-09-30 John W. Eaton <jwe@octave.org> + + * toplev.cc (octave_config_info): Use Octave_scalar_map instead + of Octave_map. + * sighandlers.cc (make_sig_struct, FSIG): Likewise. + + * utils.cc (decode_subscripts): Use octave_map instead of Octave_map. + * octave.cc (F__version_info__): Likewise. + * pt-eval.cc (visit_complex_for_command): Likewise. + * pt-idx.cc (tree_index_expression::lvalue): Likewise. + 2010-09-30 John W. Eaton <jwe@octave.org> * DLD-FUNCTIONS/gcd.cc: Style fixes.
--- a/src/octave.cc +++ b/src/octave.cc @@ -227,7 +227,7 @@ { octave_value retval; - static Octave_map vinfo; + static octave_map vinfo; int nargin = args.length ();
--- a/src/pt-eval.cc +++ b/src/pt-eval.cc @@ -451,7 +451,7 @@ octave_lvalue key_ref = elt->lvalue (); - const Octave_map tmp_val = rhs.map_value (); + const octave_map tmp_val = rhs.map_value (); tree_statement_list *loop_body = cmd.body ();
--- a/src/pt-idx.cc +++ b/src/pt-idx.cc @@ -535,10 +535,10 @@ if (pidx.has_magic_colon ()) gripe_invalid_inquiry_subscript (); else - tmp = Octave_map (); + tmp = octave_scalar_map (); } else if (autoconv) - tmp = Octave_map (); + tmp = octave_scalar_map (); retval.numel (tmp.numel (pidx));
--- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -662,10 +662,10 @@ } -static Octave_map +static octave_scalar_map make_sig_struct (void) { - Octave_map m; + octave_scalar_map m; #ifdef SIGABRT m.assign ("ABRT", SIGABRT); @@ -949,7 +949,7 @@ if (args.length () == 0) { - static Octave_map m = make_sig_struct (); + static octave_scalar_map m = make_sig_struct (); retval = m; }
--- a/src/toplev.cc +++ b/src/toplev.cc @@ -1160,7 +1160,7 @@ #endif static bool initialized = false; - static Octave_map m; + static octave_scalar_map m; struct conf_info_struct { @@ -1361,9 +1361,9 @@ if (key) { if (elt.subst_home) - m.assign (key, octave_value (subst_octave_home (elt.val))); + m.assign (key, subst_octave_home (elt.val)); else - m.assign (key, octave_value (elt.val)); + m.assign (key, elt.val); } else break;
--- a/src/utils.cc +++ b/src/utils.cc @@ -1036,17 +1036,19 @@ std::string& type_string, std::list<octave_value_list>& idx) { - Octave_map m = arg.map_value (); + const octave_map m = arg.map_value (); if (! error_state && m.nfields () == 2 && m.contains ("type") && m.contains ("subs")) { - Cell& type = m.contents ("type"); - Cell& subs = m.contents ("subs"); + const Cell type = m.contents ("type"); + const Cell subs = m.contents ("subs"); - type_string = std::string (type.length(), '\0'); + octave_idx_type nel = type.numel (); - for (int k = 0; k < type.length (); k++) + type_string = std::string (nel, '\0'); + + for (int k = 0; k < nel; k++) { std::string item = type(k).string_value ();