pike.git / src / cpp.cmod

version» Context lines:

pike.git/src/cpp.cmod:4620:    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 void high_cpp(string data) +  PIKEFUN string high_cpp(string data)    {    struct CPP_struct *this = THIS;       if (this->charset) {    ref_push_string(this->charset);    apply_current(f_CPP_decode_charset_fun_num, 2);    if (TYPEOF(Pike_sp[-1]) != PIKE_T_STRING) {    cpp_handle_exception (this, "Error decoding with charset %S",    THIS->charset);    Pike_error("Unknown charset.\n");
pike.git/src/cpp.cmod:4648:    push_string(data);    }    if (data->size_shift) {    /* Get rid of any byte order marks (0xfeff) */    data = filter_bom(data);    push_string(data);    }       push_int(0); /* flags */    apply_current(f_CPP_low_cpp_fun_num, 2); +  +  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 +  { +  push_string(finish_string_builder(&this->buf)); +  /* NB: Make sure the buffer isn't freed twice. */ +  this->buf.s = NULL; +  } +  }       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:5503:    int|void compat_major_sv,    int|void compat_minor_sv,    int|void picky_cpp_sv)    efun;   {    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; +        push_object(cpp_obj);       apply(cpp_obj, "init_pike_cpp", 0);       ref_push_string(data);    apply(cpp_obj, "high_cpp", 1);    -  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 -  { -  push_string(finish_string_builder(&this->buf)); -  /* NB: Make sure the buffer isn't freed twice. */ -  this->buf.s = NULL; -  } +     stack_pop_n_elems_keep_top((Pike_sp - save_sp) - 1);   }      /*! @module Builtin    */      /*! @decl mapping(string:mixed) _take_over_initial_predefines()    *!    *! Returns a mapping containing the set of predefined macros.    *! These are typically the macros defined via the @tt{-D@} option