pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:100:    m->next = first_mapping;    m->prev = 0;    m->refs = 1;       if(first_mapping) first_mapping->prev = m;    first_mapping=m;       return m;   }    - unsigned INT32 hash_svalue(struct svalue *s) - { -  unsigned INT32 q; -  switch(s->type) -  { -  case T_INT: q=s->u.integer; break; -  case T_FLOAT: q=(unsigned INT32)(s->u.float_number * 16843009.0); break; -  default: q=(unsigned INT32)s->u.refs >> 2; -  } -  q+=q % 997; -  q+=((q + s->type) * 9248339); +     -  return q; - } -  +    void really_free_mapping(struct mapping *m)   {    INT32 e;    struct keypair *k;   #ifdef DEBUG    if(m->refs)    fatal("really free mapping on mapping with nonzero refs.\n");   #endif       LOOP(m)
pike.git/src/mapping.c:940:    {    ret=(struct mapping *)p->pointer_b;    ret->refs++;    return ret;    }    }       ret=allocate_mapping(MAP_SLOTS(m->size));    doing.pointer_b=ret;    +  check_stack(2); +     LOOP(m)    {    /* check_destructed(& k->ind); */    check_destructed(& k->val);       copy_svalues_recursively_no_free(sp,&k->ind, 1, p);    sp++;    copy_svalues_recursively_no_free(sp,&k->val, 1, p);    sp++;