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.14 1997/03/11 23:32:28 grubba Exp $"); + RCSID("$Id: mapping.c,v 1.15 1997/03/14 04:37:16 hubbe Exp $");   #include "main.h"   #include "types.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "macros.h"   #include "language.h"   #include "error.h"   #include "memory.h"
pike.git/src/mapping.c:757:    INT32 e;       mapping_fix_type_field(m);       if((m->ind_types | m->val_types) & (BIT_FUNCTION | BIT_OBJECT))    {    struct array *ind, *val;    node *n;    ind=mapping_indices(m);    val=mapping_indices(m); -  n=mkefuncallnode("mkmapping",mknode(F_ARG_LIST,make_node_from_array(ind),make_node_from_array(val))); +  n=mkefuncallnode("mkmapping", +  mknode(F_ARG_LIST, +  make_node_from_array(ind), +  make_node_from_array(val)));    free_array(ind);    free_array(val);    return n;    }else{    struct svalue s; -  +  +  if(!m->size) +  return mkefuncallnode("aggregate_mapping",0); +     s.type=T_MAPPING;    s.subtype=0;    s.u.mapping=m;    return mkconstantsvaluenode(&s);    }   }      void f_m_delete(INT32 args)   {    if(args < 2)