Mercurial > hg > octave-terminal
changeset 11060:54697b37d8bf
replace Octave_map->octave_scalar_map in oct-parse.yy and ov-fcn-handle.cc
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 30 Sep 2010 09:13:37 +0200 |
parents | 4ffa19147604 |
children | 604dfbaf5010 |
files | src/ChangeLog src/oct-parse.yy src/ov-fcn-handle.cc |
diffstat | 3 files changed, 21 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-09-30 Jaroslav Hajek <highegg@gmail.com> + + * oct-parse.yy (Fautoload): Replace Octave_map by octave_map. + * ov-fcn-handle.cc (Ffunctions): Replace Octave_map by + octave_scalar_map. + 2010-09-30 Jaroslav Hajek <highegg@gmail.com> * help.cc (F__which__): Use octave_map instead of Octave_map.
--- a/src/oct-parse.yy +++ b/src/oct-parse.yy @@ -3832,7 +3832,7 @@ i++; } - Octave_map m; + octave_map m; m.assign ("function", func_names); m.assign ("file", file_names);
--- a/src/ov-fcn-handle.cc +++ b/src/ov-fcn-handle.cc @@ -1601,7 +1601,7 @@ if (fcn) { - Octave_map m; + octave_scalar_map m; std::string fh_nm = fh->fcn_name (); @@ -1609,35 +1609,35 @@ { std::ostringstream buf; fh->print_raw (buf); - m.assign ("function", buf.str ()); + m.setfield ("function", buf.str ()); - m.assign ("type", "anonymous"); + m.setfield ("type", "anonymous"); } else { - m.assign ("function", fh_nm); + m.setfield ("function", fh_nm); if (fcn->is_nested_function ()) { - m.assign ("type", "subfunction"); + m.setfield ("type", "subfunction"); Cell parentage (dim_vector (1, 2)); parentage.elem(0) = fh_nm; parentage.elem(1) = fcn->parent_fcn_name (); - m.assign ("parentage", octave_value (parentage)); + m.setfield ("parentage", octave_value (parentage)); } else if (fcn->is_private_function ()) - m.assign ("type", "private"); + m.setfield ("type", "private"); else if (fh->is_overloaded ()) - m.assign ("type", "overloaded"); + m.setfield ("type", "overloaded"); else - m.assign ("type", "simple"); + m.setfield ("type", "simple"); } std::string nm = fcn->fcn_file_name (); if (fh_nm == octave_fcn_handle::anonymous) { - m.assign ("file", nm); + m.setfield ("file", nm); octave_user_function *fu = fh->user_function_value (); @@ -1648,23 +1648,23 @@ if (varlen > 0) { - Octave_map ws; + octave_scalar_map ws; for (std::list<symbol_table::symbol_record>::const_iterator p = vars.begin (); p != vars.end (); p++) { ws.assign (p->name (), p->varval (0)); } - m.assign ("workspace", ws); + m.setfield ("workspace", ws); } } else if (fcn->is_user_function () || fcn->is_user_script ()) { octave_function *fu = fh->function_value (); - m.assign ("file", fu->fcn_file_name ()); + m.setfield ("file", fu->fcn_file_name ()); } else - m.assign ("file", ""); + m.setfield ("file", ""); retval = m; }