pike.git / lib / modules / Mapping.pmod

version» Context lines:

pike.git/lib/modules/Mapping.pmod:15:       static mapping joined;    static int parent_generation = -1;       static int generation;    static int dirty = 1;       // Updates the cached joined mapping if needed.    static void update_joined()    { -  if (!joined || parent_generation != m_generation(parent)) { +  if (!joined || (parent_generation != m_generation(parent))) {    joined = [mapping](parent + shadow); -  +  parent_generation = m_generation(parent); +  dirty = 1;    }    }       static mixed `[](mixed ind)    {    mixed res = shadow[ind];    if (!zero_type(res)) return res;    return parent[ind];    }   
pike.git/lib/modules/Mapping.pmod:47:    }       static void `->=(string ind, mixed val)    {    `[]=(ind, val);    }       static int _m_generation()    {    if (dirty || (parent_generation != m_generation(parent))) { -  if (parent_generation != m_generation(parent)) +  if (!dirty && (parent_generation != m_generation(parent)))    update_joined();    generation++;    dirty = 0;    }    return generation;    }       static mixed _m_delete(mixed ind)    {    mixed res = m_delete(shadow, ind);