Mercurial > hg > octave-lojdl
changeset 12114:22bc7fc7ff4d release-3-2-x
fix extract_function & add obsoleteness warning
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 13 Jan 2010 09:48:17 +0100 |
parents | 232a0ddce7cd |
children | a691ccd72863 |
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-07-23 John W. Eaton <jwe@octave.org> * toplev.cc (IGNORE_EXCEPTION, SAFE_CALL): New macros.
--- 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",