pike.git / src / cpp.cmod

version» Context lines:

pike.git/src/cpp.cmod:724:    string subsystem,    string message, mixed ... extra_args)   {    struct CPP_struct *this = THIS;    const char *compat_fun_name = "compile_warning";    const char *fun_name;    struct object *found = NULL;    int i;    int fun = -1;    if (severity >= REPORT_ERROR) { -  this->compile_errors++; +     compat_fun_name = "compile_error";    }    if (this->compile_errors > 10) return;    for (i = 0; i < 2; i++) {    struct object *handler;    int j;       if (!i) {    handler = this->handler;    } else {
pike.git/src/cpp.cmod:789:   static void cpp_warning(struct CPP_struct *this, const char *cpp_warn_fmt, ...) ATTRIBUTE((noinline));   struct define_struct *defined_macro = NULL;   static struct svalue defined_macro_sval;      static void cpp_report_vsprintf(struct CPP_struct *this, int severity,    const char *fmt, va_list args)   {    struct string_builder s;    struct pike_string *msg;    +  if (severity >= REPORT_ERROR) { +  /* NB: This increment is here (and not in report()), to allow +  * for overloading of report() with code that doesn't always +  * call the above implementation. This increment is not +  * optional as there is code that depends on it to detect +  * whether other code has failed (eg macro expansion). +  */ +  this->compile_errors++; +  } +     push_int(severity);    ref_push_string(this->current_file);    push_int(this->current_line);    push_constant_text("cpp");       init_string_builder(&s, 0);    string_builder_vsprintf(&s, fmt, args);    push_string(finish_string_builder(&s));       safe_apply_current(f_CPP_report_fun_num, 5);