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.287 2003/06/05 01:07:16 mast Exp $ + // $Id: master.pike.in,v 1.288 2003/06/05 13:11:13 mast 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:1221:    "%s\n",    describe_backtrace(err)));    }    }    _cache_full = 1;    }       static array(string) _indices()    {    fill_cache(); -  return indices(filter(cache, lambda(mixed x) {return x != ZERO_TYPE;} )); +  // Note: Cannot index cache at all here to filter out the +  // ZERO_TYPE values since that can change the order in the +  // mapping, and _indices() has to return the elements in the same +  // order as a nearby _values() call. +  return filter (indices (cache), map (values (cache), `!=, ZERO_TYPE));    }       static array(mixed) _values()    {    fill_cache();    return values(cache) - ({ZERO_TYPE});    }       void delete_value (mixed val)    {
pike.git/lib/master.pike.in:1334:    // which must not be cached to the second.    if(ret == predef::__placeholder_object) return ret;       if (zero_type(ret)) {    cache[index] = ZERO_TYPE;    } else {    cache[index] = ret;    }    return ret;    } +     static int _cache_full; -  +     void fill_cache()    {   #if 0    werror(describe_backtrace(({ "Filling cache in joinnode\n",    backtrace() })));   #endif    if (_cache_full) {    return;    }    foreach(joined_modules, object|mapping|program o) {    foreach(indices(o), string index) {    if (zero_type(cache[index])) {    `[](index);    }    }    }    _cache_full = 1;    } -  +     array(string) _indices()    {    fill_cache(); -  return indices(filter(cache, lambda(mixed x){ return x != ZERO_TYPE; })); +  // Note: Cannot index cache at all here to filter out the +  // ZERO_TYPE values since that can change the order in the +  // mapping, and _indices() has to return the elements in the same +  // order as a nearby _values() call. +  return filter (indices (cache), map (values (cache), `!=, ZERO_TYPE));    } -  +     array(mixed) _values()    {    fill_cache();    return values(cache) - ({ZERO_TYPE});    }       void delete_value (mixed val)    {    if (string name = search (cache, val))    m_delete (cache, name);