Mercurial > hg > octave-nkf
diff src/variables.cc @ 9377:610bf90fce2a
update unwind_protect usage everywhere
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 23 Jun 2009 08:22:13 +0200 |
parents | 1a1c839625b3 |
children | 1de00ca9c9f2 |
line wrap: on
line diff
--- a/src/variables.cc +++ b/src/variables.cc @@ -264,20 +264,20 @@ { int parse_status; - unwind_protect::begin_frame ("generate_struct_completions"); + unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame (); - unwind_protect_int (error_state); - unwind_protect_int (warning_state); + unwind_protect::protect_var (error_state); + unwind_protect::protect_var (warning_state); - unwind_protect_bool (discard_error_messages); - unwind_protect_bool (discard_warning_messages); + unwind_protect::protect_var (discard_error_messages); + unwind_protect::protect_var (discard_warning_messages); discard_error_messages = true; discard_warning_messages = true; octave_value tmp = eval_string (prefix, true, parse_status); - unwind_protect::run_frame ("generate_struct_completions"); + unwind_protect::run_frame (uwp_frame); if (tmp.is_defined () && tmp.is_map ()) names = tmp.map_keys (); @@ -306,16 +306,16 @@ { int parse_status; - unwind_protect::begin_frame ("looks_like_struct"); + unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame (); - unwind_protect_bool (discard_error_messages); - unwind_protect_int (error_state); + unwind_protect::protect_var (discard_error_messages); + unwind_protect::protect_var (error_state); discard_error_messages = true; octave_value tmp = eval_string (text, true, parse_status); - unwind_protect::run_frame ("looks_like_struct"); + unwind_protect::run_frame (uwp_frame); retval = (tmp.is_defined () && tmp.is_map ()); } @@ -1384,7 +1384,7 @@ { std::string nm = argv [i + 1]; - unwind_protect::begin_frame ("do_who_file"); + unwind_protect::frame_id_t uwp_frame = unwind_protect::begin_frame (); // Set up temporary scope. @@ -1408,7 +1408,7 @@ retval = do_who (i, argv, return_list, verbose, newmsg); } - unwind_protect::run_frame ("do_who_file"); + unwind_protect::run_frame (uwp_frame); } return retval;