pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   // -*- Pike -*-   //   // Master Control Program for Pike.   //   // This file is part of Pike. For copyright information see COPYRIGHT.   // Pike is distributed under GPL, LGPL and MPL. See the file COPYING   // for more information.   // - // $Id: master.pike.in,v 1.258 2003/02/27 14:52:30 marcus Exp $ + // $Id: master.pike.in,v 1.259 2003/02/27 15:33:02 grubba Exp $      #pike __REAL_VERSION__      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif      // --- Some configurable parameters
pike.git/lib/master.pike.in:881:   mapping (program:object) objects=([object_program(this_object()):this_object()]);      object low_cast_to_object(string oname, string current_file,    object|void current_handler)   {    program p;    object o;       p = low_cast_to_program(oname, current_file, current_handler, 1);    if(!p) return 0; +  // NB: p might be a function in a fake_object...    if(!objectp (o=objects[p])) o=objects[p]=p();    return o;   }      //! This function is called when the drivers wants to cast a string   //! to an object because of an implict or explicit cast. This function   //! may also receive more arguments in the future.   object cast_to_object(string oname, string current_file)   {    object o = low_cast_to_object(oname, current_file);
pike.git/lib/master.pike.in:936:    }       class module_checker    {    int `!()    {   #ifdef MODULE_TRACE    werror("%*ndirnode(%O)->module_checker()->`!()\n",    sizeof(backtrace()),dirname);   #endif -  // Pretend not to exist for now... -  // module=0; +  if (catch {    if(module=findmodule(dirname+"/module", handler))    {    if(mixed tmp=module->_module_value)    module=tmp;       /* This allows for `[] to have side effects first time    * it is called. (Specifically, the Calendar module uses    * this    */    cache=([]);    _cache_full=0;    } -  +  }) { +  // findmodule() failed. This can occur due to circularities +  // between encode_value()'ed programs. +  // The error will then typically be: +  // "Cannot call functions in unfinished objects."    -  +  // Pretend not to exist for now... +  return 1; +  } +     return !module;    }       mixed `[](string index)    {   #ifdef MODULE_TRACE    werror("%*ndirnode(%O)->module_checker()[%O]\n",    sizeof(backtrace()),dirname,index);   #endif    if(module) return module[index];