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.142 2001/11/25 01:58:44 mast Exp $"); + RCSID("$Id: mapping.c,v 1.143 2001/11/25 02:02:26 mast Exp $");   #include "main.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "pike_macros.h"   #include "pike_error.h"   #include "pike_memory.h"   #include "dynamic_buffer.h"   #include "interpret.h"
pike.git/src/mapping.c:1506:    for(;d<args;d++)    {    struct mapping *m=argp[d].u.mapping;    struct mapping_data *md=m->data;       if(md->size == 0) continue;       if(!(md->flags & MAPPING_WEAK))    {   #if 1 /* major optimization */ -  if(e==md->size) { -  ret = copy_mapping(m); -  mapping_set_flags(m, 0); -  return ret; -  } +  if(e==md->size) +  return copy_mapping(m);   #endif       if(m->refs == 1 && !md->hardlinks)    {    add_ref( ret=m );    d++;    break;    }    }    ret=allocate_mapping(MAP_SLOTS(e));