pike.git / src / mapping.h

version» Context lines:

pike.git/src/mapping.h: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.   \*/      /* -  * $Id: mapping.h,v 1.11 1998/04/24 00:01:32 hubbe Exp $ +  * $Id: mapping.h,v 1.12 1998/05/14 21:45:22 hubbe Exp $    */   #ifndef MAPPING_H   #define MAPPING_H      #include "las.h"    -  + struct keypair + { +  struct keypair *next; +  struct svalue ind, val; + }; +    struct mapping   {    INT32 refs, size, hashsize;    TYPE_FIELD ind_types, val_types;    struct mapping *next, *prev;    struct keypair **hash;    struct keypair *free_list;   };      extern struct mapping *first_mapping;      #define m_sizeof(m) ((m)->size)   #define m_ind_types(m) ((m)->ind_types)   #define m_val_types(m) ((m)->val_types) -  + #define MAPPING_LOOP(m) for(e=0;e<m->hashsize;e++) for(k=m->hash[e];k;k=k->next)      #define free_mapping(M) do{ struct mapping *m_=(M); debug_malloc_touch(m_); if(!--m_->refs) really_free_mapping(m_); }while(0)      /* Prototypes begin here */ - struct keypair; +    struct mapping *allocate_mapping(int size);   void really_free_mapping(struct mapping *m);   void mapping_fix_type_field(struct mapping *m);   void mapping_insert(struct mapping *m,    struct svalue *key,    struct svalue *val);   union anything *mapping_get_item_ptr(struct mapping *m,    struct svalue *key,    TYPE_T t);   void map_delete(struct mapping *m,