diff libinterp/interpfcn/input.cc @ 16110:7302f8a4df83

use pointer for global lexical_feedback structure * lex.h, lex.ll (curr_lexer): Rename from lexer_flags. Declare as pointer. Change all uses. * lex.h (lexical_feedback): Make copy constructor and operator= private. * toplev.cc (main_loop): Protect existing and initialize new curr_lexer. * input.cc (get_debug_input): Likewise.
author John W. Eaton <jwe@octave.org>
date Tue, 26 Feb 2013 01:10:08 -0500
parents 229eb14653fd
children 4f6c37cfbdce
line wrap: on
line diff
--- a/libinterp/interpfcn/input.cc
+++ b/libinterp/interpfcn/input.cc
@@ -678,6 +678,9 @@
       switch_to_buffer (new_buf);
     }
 
+  frame.protect_var (curr_lexer);
+  curr_lexer = new lexical_feedback ();
+
   while (Vdebugging)
     {
       reset_error_handler ();
@@ -1193,7 +1196,7 @@
 static int
 input_event_hook (void)
 {
-  if (! lexer_flags.defining_func)
+  if (! curr_lexer->defining_func)
     {
       hook_fcn_map_type::iterator p = hook_fcn_map.begin ();