Mercurial > octave
changeset 26179:a0b63c183d4b
Do not attempt to extract user code from oct-files (bug #55184).
* libinterp/parse-tree/pt-eval.cc (tree_evaluator::get_user_code): Restore the
checks accidently removed in cset
https://hg.savannah.gnu.org/hgweb/octave/rev/2eb71b83d3e2#l8.14 . Checking the
function to be user code, avoids calling user_code_value() on compiled functions
like oct-files.
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Sat, 08 Dec 2018 01:38:45 +0100 |
parents | 0a862644da84 |
children | 55564fdb3e4d |
files | libinterp/parse-tree/pt-eval.cc |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc Fri Dec 07 11:16:19 2018 -0800 +++ b/libinterp/parse-tree/pt-eval.cc Sat Dec 08 01:38:45 2018 +0100 @@ -1112,7 +1112,8 @@ if (p2 != std::string::npos) subfuns = name.substr (p2+1); - user_code = fcn.user_code_value (); + if (fcn.is_defined () && fcn.is_user_code ()) + user_code = fcn.user_code_value (); if (! user_code || subfuns.empty ()) return user_code;