pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c: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.   \*/   #include "global.h" - RCSID("$Id: mapping.c,v 1.20 1997/05/19 23:31:02 hubbe Exp $"); + RCSID("$Id: mapping.c,v 1.21 1997/08/30 18:35:42 grubba Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "pike_macros.h"   #include "language.h"   #include "error.h"   #include "pike_memory.h"   #include "dynamic_buffer.h"
pike.git/src/mapping.c:932: Inside #if defined(DEBUG)
   fatal("Hashsize is too small for mapping.\n");       if(m->size > 0 && (!m->ind_types || !m->val_types))    fatal("Mapping type fields are... wrong.\n");       if(!m->hash && m->size)    fatal("Hey! where did my hashtable go??\n");      }    - void check_all_mappings() + void check_all_mappings(void)   {    struct mapping *m;    for(m=first_mapping;m;m=m->next)    check_mapping(m);   }   #endif         #ifdef GC2   
pike.git/src/mapping.c:968: Inside #if defined(GC2)
   !(k->ind.u.object->prog))    continue;       gc_mark_svalues(&k->ind, 1);    gc_mark_svalues(&k->val, 1);    }    }    }   }    - void gc_check_all_mappings() + void gc_check_all_mappings(void)   {    INT32 e;    struct keypair *k;    struct mapping *m;       for(m=first_mapping;m;m=m->next)    {    if((m->ind_types | m->val_types) & BIT_COMPLEX)    {    LOOP(m)
pike.git/src/mapping.c:999: Inside #if defined(GC2)
   }      #ifdef DEBUG    if(d_flag > 1) check_mapping_type_fields(m);   #endif       }    }   }    - void gc_mark_all_mappings() + void gc_mark_all_mappings(void)   {    struct mapping *m;    for(m=first_mapping;m;m=m->next)    if(gc_is_referenced(m))    gc_mark_mapping_as_referenced(m);   }    - void gc_free_all_unreferenced_mappings() + void gc_free_all_unreferenced_mappings(void)   {    INT32 e;    struct keypair *k;    struct mapping *m,*next;       for(m=first_mapping;m;m=next)    {    check_mapping_for_destruct(m);    if(gc_do_free(m))    {
pike.git/src/mapping.c:1052: Inside #if defined(GC2)
      free_mapping(m);    }else{    next=m->next;    }    }   }      #endif /* GC2 */    - void zap_all_mappings() + void zap_all_mappings(void)   {    INT32 e;    struct keypair *k;    struct mapping *m,*next;       for(m=first_mapping;m;m=next)    {    m->refs++;       for(e=0;e<m->hashsize;e++)