commit bd869c7b3147c277a974c896a5e3a013979ac64e
parent d5a23dde9038a9e29d90946a2f386d98fec08f3a
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Thu, 14 Sep 2006 15:42:05 -0300
details
Diffstat:
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/lcode.c b/lcode.c
@@ -1,5 +1,5 @@
/*
-** $Id: lcode.c,v 2.27 2006/08/07 19:14:30 roberto Exp roberto $
+** $Id: lcode.c,v 2.28 2006/09/14 12:59:06 roberto Exp roberto $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -235,7 +235,7 @@ static int addk (FuncState *fs, TValue *key, TValue *v) {
int oldsize = f->sizek;
k = fs->nk;
setnvalue(idx, cast_num(k));
- luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Bx, "constant table");
+ luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Bx, "constants");
while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]);
setobj(L, &f->k[k], v);
fs->nk++;
@@ -786,11 +786,11 @@ static int luaK_code (FuncState *fs, Instruction i, int line) {
dischargejpc(fs); /* `pc' will change */
/* put new instruction in code array */
luaM_growvector(fs->L, f->code, fs->pc, f->sizecode, Instruction,
- MAX_INT, "code size");
+ MAX_INT, "opcodes");
f->code[fs->pc] = i;
/* save corresponding line information */
luaM_growvector(fs->L, f->lineinfo, fs->pc, f->sizelineinfo, int,
- MAX_INT, "code size");
+ MAX_INT, "opcodes");
f->lineinfo[fs->pc] = line;
return fs->pc++;
}
diff --git a/lmem.c b/lmem.c
@@ -1,5 +1,5 @@
/*
-** $Id: lmem.c,v 1.71 2006/07/11 15:53:29 roberto Exp roberto $
+** $Id: lmem.c,v 1.72 2006/09/14 12:59:06 roberto Exp roberto $
** Interface to Memory Manager
** See Copyright Notice in lua.h
*/
@@ -45,12 +45,12 @@
void *luaM_growaux_ (lua_State *L, void *block, int *size, size_t size_elems,
- int limit, const char *errormsg) {
+ int limit, const char *what) {
void *newblock;
int newsize;
if (*size >= limit/2) { /* cannot double it? */
if (*size >= limit) /* cannot grow even a little? */
- luaG_runerror(L, "%s overflow (limit is %d)", errormsg, limit);
+ luaG_runerror(L, "too many %s (limit is %d)", what, limit);
newsize = limit; /* still have at least one free place */
}
else {
diff --git a/lmem.h b/lmem.h
@@ -1,5 +1,5 @@
/*
-** $Id: lmem.h,v 1.30 2005/03/18 16:38:02 roberto Exp roberto $
+** $Id: lmem.h,v 1.31 2005/04/25 19:24:10 roberto Exp roberto $
** Interface to Memory Manager
** See Copyright Notice in lua.h
*/
@@ -43,7 +43,7 @@ LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize,
LUAI_FUNC void *luaM_toobig (lua_State *L);
LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size,
size_t size_elem, int limit,
- const char *errormsg);
+ const char *what);
#endif
diff --git a/lparser.c b/lparser.c
@@ -1,5 +1,5 @@
/*
-** $Id: lparser.c,v 2.46 2006/08/15 19:59:20 roberto Exp roberto $
+** $Id: lparser.c,v 2.47 2006/09/14 12:59:06 roberto Exp roberto $
** Lua Parser
** See Copyright Notice in lua.h
*/
@@ -145,7 +145,7 @@ static int registerlocalvar (LexState *ls, TString *varname) {
Proto *f = fs->f;
int oldsize = f->sizelocvars;
luaM_growvector(ls->L, f->locvars, fs->nlocvars, f->sizelocvars,
- LocVar, SHRT_MAX, "local-variable table");
+ LocVar, SHRT_MAX, "local variables");
while (oldsize < f->sizelocvars) f->locvars[oldsize++].varname = NULL;
f->locvars[fs->nlocvars].varname = varname;
luaC_objbarrier(ls->L, f, varname);
@@ -193,7 +193,7 @@ static int indexupvalue (FuncState *fs, TString *name, expdesc *v) {
/* new one */
luaY_checklimit(fs, f->nups + 1, LUAI_MAXUPVALUES, "upvalues");
luaM_growvector(fs->L, f->upvalues, f->nups, f->sizeupvalues,
- TString *, MAX_INT, "");
+ TString *, MAX_INT, "upvalues");
while (oldsize < f->sizeupvalues) f->upvalues[oldsize++] = NULL;
f->upvalues[f->nups] = name;
luaC_objbarrier(fs->L, f, name);
@@ -314,7 +314,7 @@ static void pushclosure (LexState *ls, FuncState *func, expdesc *v) {
int oldsize = f->sizep;
int i;
luaM_growvector(ls->L, f->p, fs->np, f->sizep, Proto *,
- MAXARG_Bx, "constant table");
+ MAXARG_Bx, "constants");
while (oldsize < f->sizep) f->p[oldsize++] = NULL;
f->p[fs->np++] = func->f;
luaC_objbarrier(ls->L, f, func->f);