pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:88:   //! @seealso   //! @[compat_major]   int compat_minor=-1;      //! Show compilation warnings from compilation of @[cpp()]   //! @expr{#if constant()@} expressions.   //!   //! This is typically set via the option @expr{"--picky-cpp"@}.   int show_if_constant_errors = 0;    - int is_pike_master = 0; - // This integer variable should exist in any object that aspires to be - // the master. It gets set to 1 when the master is installed, and is - // therefore set in any object that is or has been the master. That - // makes the Encoder class encode references to the master and all - // ex-masters as references to the current master object. + protected int _is_pike_master = 0;    -  + //! @decl int is_pike_master + //! This integer variable should exist in any object that aspires to be + //! the master. It gets set to 1 when the master is installed, and is + //! therefore set in any object that is or has been the master. That + //! makes the Encoder class encode references to the master and all + //! ex-masters as references to the current master object. +  + int `is_pike_master() + { +  return _is_pike_master; + } + void `is_pike_master=(int one) + { +  _is_pike_master = one; +  if (one) { +  add_constants(); +  } + } +  +    mapping(string:object) fs_map = ([]);   object root_fs;   // --- Functions begin here.      // Have to access some stuff without going through the resolver.   private object(_static_modules.Builtin) Builtin = _static_modules.Builtin();   private constant Files = _static_modules._Stdio;      #define Stat Files.Stat   #define capitalize(X) (upper_case((X)[..0])+(X)[1..])
pike.git/lib/master.pike.in:2359:   //! from the default @[RandomSystem].   //!   //! @seealso   //! @[RandomSystem()->random_string()], @[random()]      //! @decl int cp(string from, string to)   //!   //! Copies the file @[from] to the new position @[to]. This is an   //! alias for @[Stdio.cp].    - /* Note that create is called before add_precompiled_program + /* Note that add_constants() and create() are called +  * before add_precompiled_program().    */ - protected void create() + protected void add_constants()   {   #if constant(_static_modules.Builtin.__HAVE_COMPILER_NO_HANDLERS__)    add_constant("compile", compile);   #endif /* _static_modules.Builtin.__HAVE_COMPILER_NO_HANDLERS__ */    add_constant("get_active_compilation_handler", get_active_compilation_handler);    add_constant("get_active_error_handler", get_active_error_handler);    add_constant("CompilerEnvironment", CompilerEnvironment);    add_constant("DefaultCompilerEnvironment", DefaultCompilerEnvironment);    add_constant("cpp", cpp);   
pike.git/lib/master.pike.in:2409:    object rnd = Builtin.RandomSystem();    add_constant("random", rnd->random);    add_constant("random_string", rnd->random_string);      #define CO(X) add_constant(#X,Builtin.__backend->X)    CO(call_out);    CO(_do_call_outs);    CO(find_call_out);    CO(remove_call_out);    CO(call_out_info); + }    -  + protected void create() + { +  add_constants(); +    #if "#share_prefix#"[0]!='#'    // add path for architecture-independant files    add_include_path("#share_prefix#/include");    add_module_path("#share_prefix#/modules");   #endif      #if "#lib_prefix#"[0]!='#'    // add path for architecture-dependant files    add_include_path("#lib_prefix#/include");    add_module_path("#lib_prefix#/modules");