Branch: Tag:

2008-07-16

2008-07-16 01:19:46 by Martin Stjernholm <mast@lysator.liu.se>

Nicer if low_make_buf_space takes a signed amount to allow shrinking, than
that it's given a very large unsigned number that causes wrap-around.

Rev: src/dynamic_buffer.c:1.27
Rev: src/dynamic_buffer.h:1.22
Rev: src/program.c:1.737

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: program.c,v 1.736 2008/07/16 01:00:19 mast Exp $ + || $Id: program.c,v 1.737 2008/07/16 01:08:05 mast Exp $   */      #include "global.h"
1469:   #endif    c->num_used_modules -= howmany;    Pike_compiler->num_used_modules-=howmany; -  low_make_buf_space(-sizeof(struct svalue)*howmany, &c->used_modules); +  low_make_buf_space((ptrdiff_t) sizeof(struct svalue) * -howmany, +  &c->used_modules);    free_svalues((struct svalue *)low_make_buf_space(0, &c->used_modules),    howmany,    BIT_MAPPING | BIT_OBJECT | BIT_PROGRAM);