diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-14 15:42:28 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-09-14 15:42:28 -0300 |
commit | bd869c7b3147c277a974c896a5e3a013979ac64e (patch) | |
tree | 96ab39fd05ccf6a849cf60e8ce618aa7a8ff79d8 /lmem.c | |
parent | d5a23dde9038a9e29d90946a2f386d98fec08f3a (diff) | |
download | lua-bd869c7b3147c277a974c896a5e3a013979ac64e.tar.gz lua-bd869c7b3147c277a974c896a5e3a013979ac64e.tar.bz2 lua-bd869c7b3147c277a974c896a5e3a013979ac64e.zip |
details
Diffstat (limited to 'lmem.c')
-rw-r--r-- | lmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmem.c,v 1.71 2006/07/11 15:53:29 roberto Exp roberto $ | 2 | ** $Id: lmem.c,v 1.72 2006/09/14 12:59:06 roberto Exp roberto $ |
3 | ** Interface to Memory Manager | 3 | ** Interface to Memory Manager |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -45,12 +45,12 @@ | |||
45 | 45 | ||
46 | 46 | ||
47 | void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, | 47 | void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems, |
48 | int limit, const char *errormsg) { | 48 | int limit, const char *what) { |
49 | void *newblock; | 49 | void *newblock; |
50 | int newsize; | 50 | int newsize; |
51 | if (*size >= limit/2) { /* cannot double it? */ | 51 | if (*size >= limit/2) { /* cannot double it? */ |
52 | if (*size >= limit) /* cannot grow even a little? */ | 52 | if (*size >= limit) /* cannot grow even a little? */ |
53 | luaG_runerror(L, "%s overflow (limit is %d)", errormsg, limit); | 53 | luaG_runerror(L, "too many %s (limit is %d)", what, limit); |
54 | newsize = limit; /* still have at least one free place */ | 54 | newsize = limit; /* still have at least one free place */ |
55 | } | 55 | } |
56 | else { | 56 | else { |