pike.git / src / mapping.h

version» Context lines:

pike.git/src/mapping.h:2:   || 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.   */      #ifndef MAPPING_H   #define MAPPING_H      #include "svalue.h"   #include "dmalloc.h" + #include "gc_header.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_FLAG_NO_SHRINK 0x1000      struct keypair   {    struct keypair *next;    size_t hval;    struct svalue ind, val;   };      struct mapping_data   {    INT32 refs;    INT32 valrefs; /* lock values too */ -  +  struct marker m;    INT32 hardlinks;    INT32 size, hashsize;    INT32 num_keypairs;    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. */      struct mapping   {    INT32 refs; -  +  struct marker m;   #ifdef MAPPING_SIZE_DEBUG    INT32 debug_size;   #endif    struct mapping_data *data;    struct mapping *next, *prev;   };         extern struct mapping *first_mapping;   extern struct mapping *gc_internal_mapping;