diff libinterp/parse-tree/pt-eval.cc @ 29065:be19672a3c49

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Fri, 13 Nov 2020 20:43:19 -0500
parents d632d99d5c2e 336356206de7
children 10a35049bad7
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc	Fri Nov 13 16:26:13 2020 -0500
+++ b/libinterp/parse-tree/pt-eval.cc	Fri Nov 13 20:43:19 2020 -0500
@@ -2861,12 +2861,12 @@
 
     // Evaluate the commands that make up the function.
 
-    unwind_protect_var<stmt_list_type>
-      upv (m_statement_context, SC_FUNCTION);
-
-    unwind_action act1 ([=] () {
-                          m_call_stack.clear_current_frame_values ();
-                        });
+    unwind_protect_var<stmt_list_type> upv (m_statement_context, SC_FUNCTION);
+
+    unwind_action act1 ([] (std::shared_ptr<stack_frame> frame)
+                       {
+                         frame->clear_values ();
+                       }, m_call_stack.get_current_stack_frame ());
 
     tree_statement_list *cmd_list = user_function.body ();