Mercurial > jwe > octave
changeset 27000:4388526646ef
use call_stack::restore_frame instead of pop where needed
* mex.cc (mexGetVariable, mexPutVariable): Use restore_frame instead
of pop to reset current stack position after moving to base frame.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 29 Mar 2019 02:42:37 +0000 |
parents | 5bd4ffb55b1b |
children | 258195ea1a76 |
files | libinterp/corefcn/mex.cc |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/mex.cc Thu Mar 28 03:42:53 2019 +0000 +++ b/libinterp/corefcn/mex.cc Fri Mar 29 02:42:37 2019 +0000 @@ -3507,9 +3507,10 @@ { octave::call_stack& cs = interp.get_call_stack (); + frame.add_method (cs, &octave::call_stack::restore_frame, + cs.current_frame ()); + cs.goto_base_frame (); - - frame.add_method (cs, &octave::call_stack::pop); } val = interp.varval (name); @@ -3571,9 +3572,10 @@ { octave::call_stack& cs = interp.get_call_stack (); + frame.add_method (cs, &octave::call_stack::restore_frame, + cs.current_frame ()); + cs.goto_base_frame (); - - frame.add_method (cs, &octave::call_stack::pop); } interp.assign (name, mxArray::as_octave_value (ptr));