Mercurial > hg > octave-lyh
diff src/parse.y @ 9260:9c2349a51218
properly unmark forced variables
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 May 2009 11:20:40 -0400 |
parents | c6463412aebb |
children | 1de00ca9c9f2 bf90777b58c9 |
line wrap: on
line diff
--- a/src/parse.y +++ b/src/parse.y @@ -3258,6 +3258,12 @@ reset_parser (); + // Do this with an unwind-protect cleanup function so that + // the forced variables will be unmarked in the event of an + // interrupt. + symbol_table::scope_id scope = symbol_table::top_scope (); + unwind_protect::add (symbol_table::unmark_forced_variables, &scope); + if (! help_txt.empty ()) help_buf.push (help_txt); @@ -3905,10 +3911,19 @@ unwind_protect_ptr (global_command); + // Do this with an unwind-protect cleanup function so that the + // forced variables will be unmarked in the event of an + // interrupt. + symbol_table::scope_id scope = symbol_table::top_scope (); + unwind_protect::add (symbol_table::unmark_forced_variables, &scope); + parse_status = yyparse (); tree_statement_list *command_list = global_command; + // Unmark forced variables. + unwind_protect::run (); + // Restore previous value of global_command. unwind_protect::run ();