diff src/ov-usr-fcn.cc @ 7901:3e4c9b69069d

call stack changes
author John W. Eaton <jwe@octave.org>
date Tue, 08 Jul 2008 12:00:32 -0400
parents 5adeea5de26c
children 0d607e8dbbfa
line wrap: on
line diff
--- a/src/ov-usr-fcn.cc	Sat Jun 28 05:15:02 2008 -0400
+++ b/src/ov-usr-fcn.cc	Tue Jul 08 12:00:32 2008 -0400
@@ -389,11 +389,12 @@
   // Save old and set current symbol table context, for
   // eval_undefined_error().
 
-  octave_call_stack::push (this, local_scope, call_depth);
-
   symbol_table::push_scope (local_scope);
   unwind_protect::add (symbol_table::pop_scope);
 
+  octave_call_stack::push (this, local_scope, call_depth);
+  unwind_protect::add (octave_call_stack::unwind_pop, 0);
+
   if (call_depth > 0)
     {
       symbol_table::push_context ();
@@ -406,8 +407,6 @@
       unwind_protect::add (symbol_table::clear_variables);
     }
 
-  unwind_protect::add (octave_call_stack::unwind_pop, 0);
-
   if (! (is_nested_function () || is_inline_function ()))
     {
       unwind_protect_ptr (curr_parent_function);