Mercurial > octave-antonio
diff src/ov-fcn-inline.cc @ 8032:2fd4a5ef6b59
stash parent function scope for inline functions and anonymous function handles.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 12 Aug 2008 16:26:53 -0400 |
parents | 47a18b8c9000 |
children | 24701aa75ecb |
line wrap: on
line diff
--- a/src/ov-fcn-inline.cc Tue Aug 12 13:20:27 2008 -0400 +++ b/src/ov-fcn-inline.cc Tue Aug 12 16:26:53 2008 -0400 @@ -39,9 +39,11 @@ #include "oct-map.h" #include "ov-base.h" #include "ov-fcn-inline.h" +#include "ov-usr-fcn.h" #include "pr-output.h" #include "variables.h" #include "parse.h" +#include "toplev.h" #include "byte-swap.h" #include "ls-oct-ascii.h" @@ -83,7 +85,14 @@ octave_fcn_handle *fh = anon_fcn_handle.fcn_handle_value (); if (fh) - fcn = fh->fcn_val (); + { + fcn = fh->fcn_val (); + + octave_user_function *uf = fcn.user_function_value (); + + if (uf) + uf->stash_parent_fcn_scope (octave_call_stack::current_scope ()); + } } if (fcn.is_undefined ())