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.410 2008/01/04 20:42:25 nilsson Exp $ + // $Id: master.pike.in,v 1.411 2008/02/07 01:47:15 mast Exp $      #pike __REAL_VERSION__   //#pragma strict_types      // Some programs destroys character pairs beginning with the currency   // symbol when running in chinese locale.   #if "ยค/" != "\244/"   #error "master.pike.in is corrupted."   #endif   
pike.git/lib/master.pike.in:1632:    resolv_debug("dirnode(%O)->ind(%O) Trying file %O...\n",    dirname, index, fname);    Stat stat = master_file_stat(fakeroot(fname));    if (!stat) {    resolv_debug("dirnode(%O)->ind(%O) file %O disappeared!\n",    dirname, index, fname);    continue;    }    if (has_suffix(fname, ".pmod")) {    if (stat->isdir) { -  resolv_debug("dirnode(%O)->ind(%O) => found subdirectory %O\n", -  dirname, index, fname); -  return dirnode(fname, compilation_handler); +  if (dirnode n = fc[fname]) { +  // Avoid duplicate dirnodes for the same dirs. This can +  // happen if the master is replaced, e.g. with master_76 +  // in 7.6/modules/__default.pmod. +  resolv_debug("dirnode(%O)->ind(%O) => found subdirectory %O, " +  "returning old dirnode\n", dirname, index, fname); +  return n;    } -  +  resolv_debug("dirnode(%O)->ind(%O) => found subdirectory %O, " +  "creating new dirnode\n", dirname, index, fname); +  return fc[fname] = dirnode(fname, compilation_handler); +  }    resolv_debug("dirnode(%O)->ind(%O) casting (object)%O\n",    dirname, index, fname);    // FIXME: cast_to_program() and cast_to_object()    // have lots of overhead to guess the proper    // filename. This overhead isn't needed in    // our cases, so we could make do with    // low_findprog() and the caches.    mixed ret;    if (objectp(ret = low_cast_to_object(fname, 0, compilation_handler))) {    // This assignment is needed for eg the Calendar module.