pike.git / src / cpp.cmod

version» Context lines:

pike.git/src/cpp.cmod:4477:    this->current_line = first_line;    cpp_error(this, "End of file while searching for #endif.");    this->current_line = saved_line;    }       return pos;   }       PIKEFUN void low_cpp(string data, int flags)    { -  low_cpp(THIS, MKPCHARP_STR(data), data->len, flags, THIS->charset); +  struct CPP_struct *this = THIS; + #ifdef PIKE_DEBUG +  ONERROR tmp; +  SET_ONERROR(tmp, fatal_on_error, "Preprocessor exited with longjump!\n"); + #endif /* PIKE_DEBUG */ +  +  low_cpp(this, MKPCHARP_STR(data), data->len, flags, this->charset); +  + #ifdef PIKE_DEBUG +  UNSET_ONERROR(tmp); + #endif /* PIKE_DEBUG */    }       PIKEFUN string cpp(string data, int flags)    {    struct CPP_struct *this = THIS;    struct string_builder save_buf = this->buf;    struct pike_string *save_file = this->current_file;    INT_TYPE save_line = this->current_line; -  + #ifdef PIKE_DEBUG +  ONERROR tmp; +  SET_ONERROR(tmp, fatal_on_error, "Preprocessor exited with longjump!\n"); + #endif /* PIKE_DEBUG */       if (save_file) add_ref(save_file);    init_string_builder(&this->buf, 0);       low_cpp(this, MKPCHARP_STR(data), data->len, flags, THIS->charset);       push_string(finish_string_builder(&this->buf));       this->buf = save_buf;    if (this->current_file) free_string(this->current_file);    this->current_file = save_file;    this->current_line = save_line; -  +  + #ifdef PIKE_DEBUG +  UNSET_ONERROR(tmp); + #endif /* PIKE_DEBUG */    }       PIKEFUN string drain()    {    struct CPP_struct *this = THIS;    push_string(finish_string_builder(&this->buf));    init_string_builder(&this->buf, 0);    }      /*** Magic defines ***/
pike.git/src/cpp.cmod:5327:   {    struct svalue *save_sp = Pike_sp - args;    struct object *cpp_obj =    parent_clone_object(CPP_program,    compilation_environment, CPP_program_fun_num,    args-1);    struct CPP_struct *this =    (struct CPP_struct *)get_storage(cpp_obj, CPP_program);    struct mapping *predefs = NULL;    - #ifdef PIKE_DEBUG -  ONERROR tmp; - #endif /* PIKE_DEBUG */ -  +     push_object(cpp_obj);       if (use_initial_predefs)    /* Typically compiling the master here. */    predefs = initial_predefs_mapping();    else {    low_unsafe_apply_handler ("get_predefines", this->handler,    this->compat_handler, 0);    if (!UNSAFE_IS_ZERO (Pike_sp - 1)) {    struct keypair *k;
pike.git/src/cpp.cmod:5452:    if (data->size_shift) {    /* Get rid of any byte order marks (0xfeff) */    data = filter_bom(data);    push_string(data);    /* NB: We let the stack hold the references to data.    * We don't need to keep track of the number of elements    * on the stack as we have the save_sp marker.    */    }    - #ifdef PIKE_DEBUG -  SET_ONERROR(tmp, fatal_on_error, "Preprocessor exited with longjump!\n"); - #endif /* PIKE_DEBUG */ -  +     ref_push_string(data); /* data */    push_int(0); /* flags */    apply(cpp_obj, "low_cpp", 2);    - #ifdef PIKE_DEBUG -  UNSET_ONERROR(tmp); - #endif /* PIKE_DEBUG */ -  +     if(this->compile_errors)    {    throw_error_object(fast_clone_object(cpp_error_program), 0, 0,    "Cpp() failed\n");    }    else if(this->dependencies_fail)    {    push_int(0);    }    else