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.15 1999/10/20 01:44:40 hubbe Exp $ +  * $Id: mapping.h,v 1.16 1999/11/12 07:34:32 hubbe Exp $    */   #ifndef MAPPING_H   #define MAPPING_H      #include "las.h"      #define MAPPING_FLAG_WEAK 1      struct keypair   {
pike.git/src/mapping.h:29:    INT32 size, hashsize;    INT16 flags;    TYPE_FIELD ind_types, val_types;    struct mapping *next, *prev;    struct keypair **hash;    struct keypair *free_list;   };      extern struct mapping *first_mapping;    + #define map_delete(m,key) map_delete_no_free(m, key, 0)   #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 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, -  struct svalue *key); + void map_delete_no_free(struct mapping *m, +  struct svalue *key, +  struct svalue *to);   void check_mapping_for_destruct(struct mapping *m);   struct svalue *low_mapping_lookup(struct mapping *m,    struct svalue *key);   struct svalue *low_mapping_string_lookup(struct mapping *m,    struct pike_string *p);   void mapping_string_insert(struct mapping *m,    struct pike_string *p,    struct svalue *val); -  + void mapping_string_insert_string(struct mapping *m, +  struct pike_string *p, +  struct pike_string *val);   struct svalue *simple_mapping_string_lookup(struct mapping *m,    char *p);   struct svalue *mapping_mapping_lookup(struct mapping *m,    struct svalue *key1,    struct svalue *key2,    int create);   struct svalue *mapping_mapping_string_lookup(struct mapping *m,    struct pike_string *key1,    struct pike_string *key2,    int create);