pike.git / src / mapping.h

version» Context lines:

pike.git/src/mapping.h:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: mapping.h,v 1.68 2008/05/11 14:55:53 mast Exp $ + || $Id: mapping.h,v 1.69 2008/06/24 18:45:56 grubba Exp $   */      #ifndef MAPPING_H   #define MAPPING_H      #include "svalue.h"   #include "dmalloc.h"   #include "block_alloc_h.h"      /* Compatible with PIKE_WEAK_INDICES and PIKE_WEAK_VALUES. */   #define MAPPING_WEAK_INDICES 2   #define MAPPING_WEAK_VALUES 4   #define MAPPING_WEAK 6   #define MAPPING_FLAG_WEAK 6 /* Compat. */ -  + #define MAPPING_DIRTY 0x0100 /* Bump generation_cnt. */      struct keypair   {    struct keypair *next;    unsigned INT32 hval;    struct svalue ind, val;   };      struct mapping_data   {    PIKE_MEMORY_OBJECT_MEMBERS;    INT32 valrefs; /* lock values too */    INT32 hardlinks;    INT32 size, hashsize;    INT32 num_keypairs; -  +  INT32 generation_cnt;    TYPE_FIELD ind_types, val_types;    INT16 flags;    struct keypair *free_list;    struct keypair *hash[1 /* hashsize */ ];    /* struct keypair data_block[ hashsize * AVG_LINK_LENGTH ] */   };      #undef MAPPING_SIZE_DEBUG   /* This debug doesn't work with weak mappings in the gc. */   
pike.git/src/mapping.h:361:   PMOD_EXPORT int mapping_equal_p(struct mapping *a, struct mapping *b, struct processing *p);   void describe_mapping(struct mapping *m,struct processing *p,int indent);   node *make_node_from_mapping(struct mapping *m);   PMOD_EXPORT void f_aggregate_mapping(INT32 args);   PMOD_EXPORT struct mapping *copy_mapping_recursively(struct mapping *m,    struct mapping *p);   PMOD_EXPORT void mapping_search_no_free(struct svalue *to,    struct mapping *m,    const struct svalue *look_for,    const struct svalue *key ); + PMOD_EXPORT INT32 mapping_generation(struct mapping *m);   #ifdef PIKE_DEBUG   void check_mapping(const struct mapping *m);   void check_all_mappings(void);   #endif   PMOD_EXPORT void visit_mapping (struct mapping *m, int action);   void gc_mark_mapping_as_referenced(struct mapping *m);   void real_gc_cycle_check_mapping(struct mapping *m, int weak);   unsigned gc_touch_all_mappings(void);   void gc_check_all_mappings(void);   void gc_mark_all_mappings(void);