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 under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: mapping.c,v 1.209 2008/06/29 08:57:03 grubba Exp $ + || $Id: mapping.c,v 1.210 2008/06/29 08:58:30 grubba Exp $   */      #include "global.h"   #include "main.h"   #include "object.h"   #include "mapping.h"   #include "svalue.h"   #include "array.h"   #include "pike_macros.h"   #include "pike_error.h"
pike.git/src/mapping.c:1414:   #endif    add_ref(n->data);    n->data->valrefs++;    n->data->hardlinks++;    debug_malloc_touch(n->data);    return n;   }      #endif    + /* copy_mapping() for when destructive operations are ok. */   static struct mapping *destructive_copy_mapping(struct mapping *m)   {    if ((m->refs == 1) && !m->data->hardlinks &&    !(m->data->flags & MAPPING_WEAK)) {    /* We may perform destructive operations on the mapping. */    add_ref(m);    return m;    }    return copy_mapping(m);   }