comparison src/variables.cc @ 9396:17af7cce7d1b

yet more unwind_protect improvements
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 25 Jun 2009 13:57:38 +0200
parents 1de00ca9c9f2
children c5f03874ea2a
comparison
equal deleted inserted replaced
9395:1de00ca9c9f2 9396:17af7cce7d1b
1387 unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame (); 1387 unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame ();
1388 1388
1389 // Set up temporary scope. 1389 // Set up temporary scope.
1390 1390
1391 symbol_table::scope_id tmp_scope = symbol_table::alloc_scope (); 1391 symbol_table::scope_id tmp_scope = symbol_table::alloc_scope ();
1392 unwind_protect::add_action_var (symbol_table::erase_scope, tmp_scope); 1392 unwind_protect::add_fcn (symbol_table::erase_scope, tmp_scope);
1393 1393
1394 symbol_table::set_scope (tmp_scope); 1394 symbol_table::set_scope (tmp_scope);
1395 1395
1396 octave_call_stack::push (tmp_scope, 0); 1396 octave_call_stack::push (tmp_scope, 0);
1397 unwind_protect::add (octave_call_stack::unwind_pop, 0); 1397 unwind_protect::add_fcn (octave_call_stack::pop);
1398 1398
1399 unwind_protect::add (symbol_table::clear_variables); 1399 unwind_protect::add_fcn (symbol_table::clear_variables);
1400 1400
1401 feval ("load", octave_value (nm), 0); 1401 feval ("load", octave_value (nm), 0);
1402 1402
1403 if (! error_state) 1403 if (! error_state)
1404 { 1404 {