Mercurial > hg > octave-shane
changeset 9727:04386b72d3df
fix extract_function & add obsoleteness warning
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 15 Oct 2009 13:06:48 +0200 |
parents | b7b89061bd0e |
children | 70925b11ba46 |
files | src/ChangeLog src/variables.cc |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-10-15 Jaroslav Hajek <highegg@gmail.com> + + * variables.cc (extract_function): Pass 0 to eval_string to avoid + error. + 2009-10-14 Jaroslav Hajek <highegg@gmail.com> * ov.cc (octave_value::octave_value (const Array<std::string>&)): New
--- a/src/variables.cc +++ b/src/variables.cc @@ -159,7 +159,7 @@ { int parse_status; - eval_string (cmd, true, parse_status); + eval_string (cmd, true, parse_status, 0); if (parse_status == 0) { @@ -171,6 +171,9 @@ warn_for.c_str (), fname.c_str ()); return retval; } + + warning ("%s: passing function body as a string is obsolete." + " Please use anonymous functions.", warn_for.c_str ()); } else error ("%s: `%s' is not valid as a function",