pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:665:       string format_exception(mixed err)    {    return 0;    }       class CPP    {    inherit ::this_program;    + #if constant(_static_modules.Builtin.__HAVE_CPP_NO_HANDLERS__) +  object handler; +  object compat_handler; + #endif +     protected mixed apply_handler(string fun, mixed ... args)    {    function f;    foreach(({ handler, compat_handler }), object o) {    if (objectp(o) && functionp(f = predef::`->(o, fun))) {    return f(@args);    }    }    return CompilerEnvironment::`->(fun)(@args);    }
pike.git/lib/master.pike.in:761:    }    }    ::report(severity, filename, linenumber, subsystem, message, @extra_args);    }       object get_compilation_handler(int major, int minor)    {    return apply_handler(__func__, major, minor);    }    + #if constant(_static_modules.Builtin.__HAVE_CPP_NO_HANDLERS__) +  mapping(string:string|function|object) get_predefines() +  { +  return apply_handler(__func__); +  } +  +  mixed resolv(string sym) +  { +  return apply_handler(__func__, sym, current_file, +  handler, compat_handler); +  } +  +  string handle_include(string header_file, string current_file, +  int(0..1) is_local_ref) +  { +  return apply_handler(__func__, header_file, current_file, +  is_local_ref); +  } +  +  string read_include(string filename) +  { +  return apply_handler(__func__, filename); +  } +  +  string decode_charset(string data, string charset) +  { +  return apply_handler(__func__, data, charset); +  } + #endif +     string evaluate_define(string def, string|void arguments)    {    return apply_handler(__func__, def, arguments);    }       void change_cpp_compatibility(int major, int minor)    {    if ((compat_major == major) && (compat_minor == minor)) {    return;    }
pike.git/lib/master.pike.in:795:       string format_exception(mixed err)    {    string ret = apply_handler(__func__, err);    if (ret) return ret;    if (compile_exception(err)) {    return "";    }    return 0;    } +  + #if constant(_static_modules.Builtin.__HAVE_CPP_NO_HANDLERS__) +  +  protected void create(mapping(string:mixed) options) +  { +  // werror("CPP(%O)\n", options); +  handler = options->handler; +  compat_handler = UNDEFINED; +  ::create(options);    } -  +  +  protected variant void create(string|void current_file, +  int|string|void charset, object|void handler, +  void|int compat_major, void|int compat_minor, +  void|int picky_cpp) +  { +  mapping(string:mixed) options = ([]); + #define CPP_OPT(X) do { if (X) { options->X = X; } } while(0) +  CPP_OPT(current_file); +  CPP_OPT(charset); +  CPP_OPT(handler); +  CPP_OPT(compat_major); +  CPP_OPT(compat_minor); +  CPP_OPT(picky_cpp); + #undef CPP_OPT +  local::create(options);    } -  + #endif +  } + }      protected CompilerEnvironment DefaultCompilerEnvironment =    CompilerEnvironment();      protected string cpp(string data, mapping|string|void current_file,    int|string|void charset, object|void handler,    void|int compat_major, void|int compat_minor,    void|int picky_cpp)   {    CompilerEnvironment.CPP cpp_obj =