pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:7659:    {    data_size += rec_size_svalue( &k->ind, m );    data_size += rec_size_svalue( &k->val, m );    data_size += sizeof( struct keypair );    }    res += data_size / (d->hardlinks+1);    }    break;    }    res /= *s->u.refs; -  low_mapping_lookup(*m,s)->u.integer = res; +  +  /* NB: We added s to the mapping above the switch, so we should +  * always find something here, but... +  */ +  x = low_mapping_lookup(*m, s); +  assert(x); +  assert(TYPEOF(*x) == PIKE_T_INT); +  assert(!SUBTYPEOF(*x)); +  x->u.integer = res; +     return res;   }      /*! @decl int size_object(object o)    *! @belongs Debug    *!    *! Return the aproximate size of the object, in bytes.    *! This might not work very well for native objects    *!    *!