pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: mapping.c,v 1.9 1996/12/05 01:51:22 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.10 1997/01/27 01:21:34 hubbe Exp $");   #include "main.h"   #include "types.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "macros.h"   #include "language.h"   #include "error.h"   #include "memory.h"
pike.git/src/mapping.c:96:    m->free_list[e-1].next = m->free_list + e;    m->free_list[e-1].next=0;       m->ind_types = 0;    m->val_types = 0;    m->size = 0;   }      /* This function allocates an empty mapping with room for 'size' values    */ - static struct mapping *allocate_mapping(int size) + struct mapping *allocate_mapping(int size)   {    struct mapping *m;       GC_ALLOC();       m=ALLOC_STRUCT(mapping);       init_mapping(m,size);       m->next = first_mapping;
pike.git/src/mapping.c:458:    m->hash[h]=k;       return &k->val;    }    }    }       return 0;   }    + struct svalue *low_mapping_string_lookup(struct mapping *m, +  struct pike_string *p) + { +  struct svalue tmp; +  tmp.type=T_STRING; +  tmp.u.string=p; +  return low_mapping_lookup(m, &tmp); + } +    void mapping_index_no_free(struct svalue *dest,    struct mapping *m,    struct svalue *key)   {    struct svalue *p;       if(p=low_mapping_lookup(m,key))    {    if(p->type==T_INT)    p->subtype=NUMBER_NUMBER;