Branch: Tag:

2008-05-01

2008-05-01 21:44:34 by Martin Stjernholm <mast@lysator.liu.se>

Use a better type for counting bytes.

Rev: src/array.c:1.204
Rev: src/array.h:1.73
Rev: src/block_alloc.h:1.85
Rev: src/block_alloc_h.h:1.25
Rev: src/builtin_functions.c:1.658
Rev: src/multiset.h:1.42
Rev: src/object.c:1.287
Rev: src/program.h:1.241
Rev: src/stralloc.c:1.214
Rev: src/stralloc.h:1.101

2:   || 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: stralloc.c,v 1.213 2007/11/11 13:18:53 nilsson Exp $ + || $Id: stralloc.c,v 1.214 2008/05/01 21:44:33 mast Exp $   */      #include "global.h"
2036: Inside #if defined(DO_PIKE_CLEANUP)
      if (exit_with_cleanup)    { -  INT32 num,size; +  size_t num,size;    count_memory_in_strings(&num,&size);    if(num)    { -  fprintf(stderr,"Strings left: %d (%d bytes) (zapped)\n",num,size); +  fprintf(stderr,"Strings left: %"PRINTSIZET"d " +  "(%"PRINTSIZET"d bytes) (zapped)\n",num,size);   #ifdef PIKE_DEBUG    dump_stralloc_strings();   #endif
2074:   #endif /* DO_PIKE_CLEANUP */   }    - void count_memory_in_strings(INT32 *num, INT32 *size) + void count_memory_in_strings(size_t *num, size_t *size)   { -  unsigned INT32 e, num_=0, size_=0; +  unsigned INT32 e; +  size_t num_=0, size_=0;    if(!base_table)    {    *num=*size=0;