pike.git / src / array.c

version» Context lines:

pike.git/src/array.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: array.c,v 1.152 2003/11/09 02:40:42 mast Exp $ + || $Id: array.c,v 1.153 2004/03/09 15:48:51 nilsson Exp $   */      #include "global.h"   #include "svalue.h"   #include "array.h"   #include "object.h"   #include "las.h"   #include "stralloc.h"   #include "interpret.h"   #include "opcodes.h"
pike.git/src/array.c:19:   #include "builtin_functions.h"   #include "pike_memory.h"   #include "gc.h"   #include "main.h"   #include "security.h"   #include "stuff.h"   #include "bignum.h"   #include "cyclic.h"   #include "multiset.h"    - RCSID("$Id: array.c,v 1.152 2003/11/09 02:40:42 mast Exp $"); + RCSID("$Id: array.c,v 1.153 2004/03/09 15:48:51 nilsson Exp $");      PMOD_EXPORT struct array empty_array=   {    PIKE_CONSTANT_MEMOBJ_INIT(1), /* Never free */    &weak_empty_array, /* Next */    &weak_shrink_empty_array, /* previous (circular) */    0, /* Size = 0 */    0, /* malloced Size = 0 */    0, /* no types */    0, /* no flags */
pike.git/src/array.c:1250: Inside #if defined(PIKE_DEBUG)
      t |= 1 << ITEM(v)[e].type;    }       if(t & ~(v->type_field))    {    describe(v);    Pike_fatal("Type field out of order!\n");    }   } - #endif + #endif /* PIKE_DEBUG */    - PMOD_EXPORT struct array *compact_array(struct array *v) { return v; } -  +    /*    * Get a pointer to the 'union anything' specified IF it is of the specified    * type. The 'union anything' may be changed, but not the type.    */   PMOD_EXPORT union anything *low_array_get_item_ptr(struct array *a,    INT32 ind,    TYPE_T t)   {    if(ITEM(a)[ind].type == t) return & (ITEM(a)[ind].u);    return 0;
pike.git/src/array.c:1888:    indent += 2;       for(e=0; e<a->size; e++)    {    if(e) my_strcat(",\n");    for(d=0; d<indent; d++) my_putchar(' ');    describe_svalue(ITEM(a)+e,indent,p);    }   }    - PMOD_EXPORT void simple_describe_array(struct array *a) +  + #ifdef PIKE_DEBUG + void simple_describe_array(struct array *a)   {    dynamic_buffer save_buf;    char *s;    init_buf(&save_buf);    describe_array_low(a,0,0);    s=simple_free_buf(&save_buf);    fprintf(stderr,"({\n%s\n})\n",s);    free(s);   }      void describe_index(struct array *a,    int e,    struct processing *p,    int indent)   {    describe_svalue(ITEM(a)+e, indent, p);   } -  + #endif         void describe_array(struct array *a,struct processing *p,int indent)   {    struct processing doing;    INT32 e;    char buf[60];    if(! a->size)    {    my_strcat("({ })");