pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:150:   #define INC_RESOLV_MSG_DEPTH() 0   #define DEC_RESOLV_MSG_DEPTH() 0   #define resolv_debug(X...) do {} while (0)   #endif // !RESOLV_DEBUG      constant no_value = (<>);   constant NoValue = typeof (no_value);      // Some API compatibility stuff.    - //! Pike 7.4 master compatibility interface. + //! Pike 7.6 master compatibility interface.   //!   //! Most of the interface is implemented via mixin,   //! or overloading by more recent masters.   //!   //! This interface is used for compatibility with - //! Pike 7.4. + //! Pike 7.6.   //!   //! @deprecated predef::MasterObject   //!   //! @seealso   //! @[get_compat_master()], @[master()], @[predef::MasterObject] - protected class Pike_7_4_master + protected class Pike_7_6_master   {    extern array(string) pike_include_path;    extern array(string) pike_module_path;    extern array(string) pike_program_path;   #ifdef GETCWD_CACHE    extern string current_path;    int cd(string s);    string getcwd();   #endif    string combine_path_with_cwd(string path);
pike.git/lib/master.pike.in:261:   #pragma deprecation_warnings       void add_include_path(string tmp);    void remove_include_path(string tmp);    void add_module_path(string tmp);    void remove_module_path(string tmp);    void add_program_path(string tmp);    void remove_program_path(string tmp);    mapping(string:program|NoValue) programs;    -  void create(); +     extern mapping(program:object) objects;    object cast_to_object(string oname, string current_file);    class dirnode {};    extern string _master_file_name;    void _main(array(string) orig_argv, array(string) env);    extern mixed inhibit_compile_errors;    void set_inhibit_compile_errors(mixed f);    string trim_file_name(string s);    void compile_error(string file,int line,string err);    string handle_include(string f, string current_file, int local_include);
pike.git/lib/master.pike.in:316:    string master_read_file();    string normalize_path(string X);    array(string) query_precompiled_names(string fname);    program cast_to_program(string pname, string current_file,    object|void handler);    void handle_error(array(mixed)|object trace);    program handle_inherit(string pname, string current_file, object|void handler);    mixed handle_import(string what, string|void current_file, object|void handler);    mixed resolv_base(string identifier, string|void current_file);    -  // FIXME: Not in 7.7! -  extern mapping resolv_cache; +     mixed get_inhibit_compile_errors();    string decode_charset(string data, string charset);       string describe_object(object o);    string describe_backtrace(array(mixed) trace, void|int linewidth);    string describe_error(mixed trace);       // ---      #ifdef PIKE_MODULE_RELOC
pike.git/lib/master.pike.in:372:    string programs_reverse_lookup (program prog);    program objects_reverse_lookup (object obj);    string fc_reverse_lookup (object obj);    void unregister(program p);    program low_cast_to_program(string pname,    string current_file,    object|void handler,    void|int mkobj);    extern string include_prefix;    extern mapping(string:string) predefines; -  // FIXME: Not in 7.7! -  extern CompatResolver parent_resolver; +     void add_predefine (string name, string value);    void remove_predefine (string name);    mapping get_predefines();   #if constant(thread_create)    object backend_thread();   #endif    function(string:string) set_trim_file_name_callback(function(string:string) s);    int compile_exception (array|object trace);    string program_path_to_name ( string path,    void|string module_prefix,
pike.git/lib/master.pike.in:408:    // Codec::Decoder:    extern string fname;    extern int mkobj;    object __register_new_program(program p);    object objectof (string|array what);    function functionof (string|array what);    program programof (string|array what);    void decode_object(object o, mixed data);       string _sprintf(int t); -  local protected object Pike_7_4_compat_handler; -  local mixed resolv(string identifier, string|void current_file) -  { -  if (!Pike_7_4_compat_handler) { -  Pike_7_4_compat_handler = global::get_compilation_handler(7, 4); -  } -  return Pike_7_4_compat_handler->resolv(identifier, current_file); -  } -  object get_compat_master(int major, int minor) -  { -  // 0.0 .. 7.4 -  if ((major < 7) || (major == 7) && (minor < 5)) -  return this_program::this; -  return get_compat_master(major, minor); +     -  } +  // ---    -  /* No missing symbols. */ - } -  - //! Pike 7.6 master compatibility interface. - //! - //! Most of the interface is implemented via mixin, - //! or overloading by more recent masters. - //! - //! This interface is used for compatibility with - //! Pike 7.5 and 7.6. - //! - //! @deprecated predef::MasterObject - //! - //! @seealso - //! @[get_compat_master()], @[master()], @[predef::MasterObject] - protected class Pike_7_6_master - { -  inherit Pike_7_4_master; -  +     extern int show_if_constant_errors; -  protected void create(); +     extern mapping(string:string) initial_predefines;    extern joinnode root_module;    extern mapping(object:joinnode) handler_root_modules;    extern array(string) system_module_path; -  protected extern CompatResolver parent_resolver; -  protected extern mapping resolv_cache; +     extern CompatResolver fallback_resolver;    joinnode get_root_module(object|void current_handler); -  class Pike06Resolver {} +     local protected object Pike_7_6_compat_handler;    local mixed resolv_or_error(string identifier, string|void current_file,    void|object current_handler)    {    if (!Pike_7_6_compat_handler) {    Pike_7_6_compat_handler = global::get_compilation_handler(7, 6);    }    return Pike_7_6_compat_handler->resolv_or_error(identifier, current_file,    current_handler);    }    local mixed resolv(string identifier, string|void current_file)    {    if (!Pike_7_6_compat_handler) {    Pike_7_6_compat_handler = global::get_compilation_handler(7, 6);    }    return Pike_7_6_compat_handler->resolv(identifier, current_file);    }    array get_backtrace (object|array err);    object get_compat_master(int major, int minor)    { -  if ((major < 7) || ((major == 7) && (minor < 5))) -  return Pike_7_4_master::get_compat_master(major, minor); -  // 7.5 & 7.6 -  if ((major == 7) && (minor < 7)) +  // 0.0 .. 7.6 +  if ((major < 7) || ((major == 7) && (minor < 7)))    return this_program::this;    return get_compat_master(major, minor);    }       /* No missing symbols. */   }      //! Pike 7.8 master compatibility interface.   //!   //! Most of the interface is implemented via mixin,
pike.git/lib/master.pike.in:3119:    }       protected string _sprintf(int t)    {    return t=='O' && sprintf("CompatResolver(%O)",ver);    }   }      inherit CompatResolver;    - //! - class Pike06Resolver - { -  inherit CompatResolver; -  -  //! In Pike 0.6 the current directory was implicitly searched. -  mixed resolv_base(string identifier, string|void current_file, -  object|void current_handler) -  { -  if (current_file) { -  joinnode node = handle_import(".", current_file, current_handler); -  return node[identifier] || -  ::resolv_base(identifier, current_file, current_handler); -  } -  return ::resolv_base(identifier, current_file, current_handler); -  } - } -  +    //! These are useful if you want to start other Pike processes   //! with the same options as this one was started with.   string _pike_file_name;   string _master_file_name;      // Gets set to 1 if we're in async-mode (script->main() returned <0)   private int(0..1) _async=0;      //! Returns 1 if we┬┤re in async-mode, e.g. if the main method has   //! returned a negative number.
pike.git/lib/master.pike.in:5575:       // The root resolver is this object.    ret = this;       foreach(reverse(available), Version tmp)    {    CompatResolver compat_handler = compat_handler_cache[tmp];    if (!compat_handler) {    // Create a new compat handler, that    // falls back to the successor version. -  if (tmp <= Version(0, 6)) { -  compat_handler = Pike06Resolver(tmp, ret); -  } else { +     compat_handler = CompatResolver(tmp, ret); -  } +        string base;   #if "#lib_prefix#"[0]!='#'    base=combine_path("#lib_prefix#",sprintf("%s",tmp));    compat_handler->add_module_path(combine_path(base,"modules"));    compat_handler->add_include_path(combine_path(base,"include"));   #endif      #if "#share_prefix#"[0]!='#'    base=combine_path("#share_prefix#",sprintf("%s",tmp));