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.53 2004/03/22 19:35:44 mast Exp $ + || $Id: mapping.h,v 1.54 2004/04/18 02:16:06 mast Exp $   */      #ifndef MAPPING_H   #define MAPPING_H      #include "svalue.h"   #include "block_alloc_h.h"      /* Compatible with PIKE_WEAK_INDICES and PIKE_WEAK_VALUES. */   #define MAPPING_WEAK_INDICES 2
pike.git/src/mapping.h:75:   #define MAPPING_LOOP(m) \    for((e=0) DO_IF_DMALLOC( ?0:(debug_malloc_touch(m),debug_malloc_touch((m)->data))) ;e<(m)->data->hashsize;e++) for(k=(m)->data->hash[e];k;k=k->next)   #else /* PIKE_MAPPING_KEYPAIR_LOOP */   #define NEW_MAPPING_LOOP(md) \    for(((k = MD_KEYPAIRS(md, (md)->hashsize)), e=0) DO_IF_DMALLOC( ?0:(debug_malloc_touch(md)) ) ; e<(md)->size; e++,k++)   /* WARNING: this should not be used */   #define MAPPING_LOOP(m) \    for(((k = MD_KEYPAIRS((m)->data, (m)->data->hashsize)), e=0) DO_IF_DMALLOC( ?0:(debug_malloc_touch(m),debug_malloc_touch((m)->data)) ) ; e<(m)->data->size; e++,k++)   #endif /* PIKE_MAPPING_KEYPAIR_LOOP */    - #define free_mapping(M) do{ struct mapping *m_=(M); debug_malloc_touch(m_); if(!sub_ref(m_)) really_free_mapping(m_); }while(0) + #define free_mapping(M) do{ \ +  struct mapping *m_=(M); \ +  debug_malloc_touch(m_); \ +  DO_IF_PIKE_CLEANUP ( \ +  if (gc_external_refs_zapped) \ +  gc_check_zapped (m_, PIKE_T_MAPPING, __FILE__, __LINE__); \ +  ); \ +  if(!sub_ref(m_)) \ +  really_free_mapping(m_); \ +  }while(0)      #define free_mapping_data(M) do{ \    struct mapping_data *md_=(M); \    debug_malloc_touch(md_); \    if(!sub_ref(md_)) really_free_mapping_data(md_); \    /* FIXME: What about valrefs & hardlinks? */ \   }while(0)      PMOD_PROTO void really_free_mapping(struct mapping *md);