pike.git / src / mapping.c

version» Context lines:

pike.git/src/mapping.c:1:   /*\   ||| This file is part of Pike. For copyright information see COPYRIGHT.   ||| 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.146 2002/01/16 02:54:14 nilsson Exp $"); + RCSID("$Id: mapping.c,v 1.147 2002/05/10 23:52:34 nilsson 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:1799:   PMOD_EXPORT void f_aggregate_mapping(INT32 args)   {    INT32 e;    struct mapping *m;       if(args & 1)    Pike_error("Uneven number of arguments to aggregate_mapping.\n");       m=allocate_mapping(MAP_SLOTS(args / 2));    -  for(e=-args;e<0;e+=2) mapping_insert(m, sp+e, sp+e+1); +  for(e=-args;e<0;e+=2) mapping_insert(m, Pike_sp+e, Pike_sp+e+1);    pop_n_elems(args);   #ifdef PIKE_DEBUG    if(d_flag)    check_mapping(m);   #endif    push_mapping(m);   }      PMOD_EXPORT struct mapping *copy_mapping_recursively(struct mapping *m,    struct processing *p)
pike.git/src/mapping.c:1852:       ret->data->flags = m->data->flags;       check_stack(2);       md=m->data;    md->valrefs++;    add_ref(md);    NEW_MAPPING_LOOP(md)    { -  copy_svalues_recursively_no_free(sp,&k->ind, 1, &doing); -  sp++; -  copy_svalues_recursively_no_free(sp,&k->val, 1, &doing); -  sp++; +  copy_svalues_recursively_no_free(Pike_sp,&k->ind, 1, &doing); +  Pike_sp++; +  copy_svalues_recursively_no_free(Pike_sp,&k->val, 1, &doing); +  Pike_sp++;    -  mapping_insert(ret, sp-2, sp-1); +  mapping_insert(ret, Pike_sp-2, Pike_sp-1);    pop_n_elems(2);    }    md->valrefs--;    free_mapping_data(md);       return ret;   }         PMOD_EXPORT void mapping_search_no_free(struct svalue *to,