Branch: Tag:

2001-06-14

2001-06-14 16:12:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed [bug 1739].

Rev: src/program.c:1.332

5:   \*/   /**/   #include "global.h" - RCSID("$Id: program.c,v 1.331 2001/06/14 11:54:16 grubba Exp $"); + RCSID("$Id: program.c,v 1.332 2001/06/14 16:12:13 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
3939:    if(target && !(target->flags & PROGRAM_VIRGIN))    Pike_error("Placeholder program is not virgin!\n");    +  low_init_threads_disable(); +  saved_threads_disabled = threads_disabled; +  +  CDFPRINTF((stderr, +  "th(%ld) compile() Start: threads_disabled:%d, compilation_depth:%d\n", +  (long)th_self(), threads_disabled, compilation_depth)); +  +  + #ifdef PIKE_DEBUG +  SET_ONERROR(tmp, fatal_on_error,"Compiler exited with longjump!\n"); + #endif +     error_handler = handler;    compat_handler=0;       if(error_handler)    { -  apply(error_handler,"get_default_module",0); +  add_ref(error_handler); +  safe_apply(error_handler,"get_default_module",0);    if(IS_ZERO(Pike_sp-1))    {    pop_stack();
3954:    ref_push_mapping(get_builtin_constants());    }    -  low_init_threads_disable(); -  saved_threads_disabled = threads_disabled; -  -  CDFPRINTF((stderr, -  "th(%ld) compile() Start: threads_disabled:%d, compilation_depth:%d\n", -  (long)th_self(), threads_disabled, compilation_depth)); -  -  - #ifdef PIKE_DEBUG -  SET_ONERROR(tmp, fatal_on_error,"Compiler exited with longjump!\n"); - #endif -  +     Pike_compiler->num_used_modules=0;       save_lex=lex;
4129:    compilation_depth=save_depth;    used_modules = used_modules_save;    Pike_compiler->num_used_modules = num_used_modules_save ; +  if (error_handler) { +  free_object(error_handler); +  }    error_handler = saved_handler;    if (compat_handler) {    free_object(compat_handler);