diff options
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | doc/manual.html | 2 | ||||
-rw-r--r-- | src/lauxlib.c | 6 | ||||
-rw-r--r-- | src/lgc.c | 8 | ||||
-rw-r--r-- | src/lmem.h | 8 | ||||
-rw-r--r-- | src/lparser.c | 8 |
6 files changed, 17 insertions, 17 deletions
@@ -1,5 +1,5 @@ -This is Lua 5.2, released on 30 Nov 2011. +This is Lua 5.2, released on 05 Dec 2011. For installation instructions, license details, and further information about Lua, see doc/readme.html. diff --git a/doc/manual.html b/doc/manual.html index 5ce261ed..1fbc8260 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -10382,7 +10382,7 @@ Here is the complete syntax of Lua in extended BNF. <HR> <SMALL CLASS="footer"> Last update: -Wed Nov 30 18:23:56 BRST 2011 +Mon Dec 5 11:07:57 BRST 2011 </SMALL> <!-- Last change: revised for Lua 5.2.0 diff --git a/src/lauxlib.c b/src/lauxlib.c index 5339bc54..4c044f9d 100644 --- a/src/lauxlib.c +++ b/src/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.238 2011/11/30 12:58:57 roberto Exp $ +** $Id: lauxlib.c,v 1.239 2011/12/02 13:25:57 roberto Exp $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -269,7 +269,7 @@ LUALIB_API int luaL_execresult (lua_State *L, int stat) { */ LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) { - lua_getfield(L, LUA_REGISTRYINDEX, tname); /* get registry.name */ + luaL_getmetatable(L, tname); /* try to get metatable */ if (!lua_isnil(L, -1)) /* name already in use? */ return 0; /* leave previous value on top, but return 0 */ lua_pop(L, 1); @@ -290,7 +290,7 @@ LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) { void *p = lua_touserdata(L, ud); if (p != NULL) { /* value is a userdata? */ if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ - lua_getfield(L, LUA_REGISTRYINDEX, tname); /* get correct metatable */ + luaL_getmetatable(L, tname); /* get correct metatable */ if (!lua_rawequal(L, -1, -2)) /* not the same? */ p = NULL; /* value is a userdata with wrong metatable */ lua_pop(L, 2); /* remove both metatables */ @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 2.115 2011/11/28 17:25:48 roberto Exp $ +** $Id: lgc.c,v 2.116 2011/12/02 13:18:41 roberto Exp $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -291,7 +291,7 @@ static void reallymarkobject (global_State *g, GCObject *o) { /* -** mark tag methods for basic types +** mark metamethods for basic types */ static void markmt (global_State *g) { int i; @@ -774,7 +774,7 @@ static void GCTM (lua_State *L, int propagateerrors) { int status; lu_byte oldah = L->allowhook; int running = g->gcrunning; - L->allowhook = 0; /* stop debug hooks during GC tag method */ + L->allowhook = 0; /* stop debug hooks during GC metamethod */ g->gcrunning = 0; /* avoid GC steps */ setobj2s(L, L->top, tm); /* push finalizer... */ setobj2s(L, L->top + 1, &v); /* ... and its argument */ @@ -784,7 +784,7 @@ static void GCTM (lua_State *L, int propagateerrors) { g->gcrunning = running; /* restore state */ if (status != LUA_OK && propagateerrors) { /* error while running __gc? */ if (status == LUA_ERRRUN) { /* is there an error msg.? */ - luaO_pushfstring(L, "error in __gc tag method (%s)", + luaO_pushfstring(L, "error in __gc metamethod (%s)", lua_tostring(L, -1)); status = LUA_ERRGCMM; /* error in __gc metamethod */ } @@ -1,5 +1,5 @@ /* -** $Id: lmem.h,v 1.37 2011/11/30 12:42:49 roberto Exp $ +** $Id: lmem.h,v 1.38 2011/12/02 13:26:54 roberto Exp $ ** Interface to Memory Manager ** See Copyright Notice in lua.h */ @@ -15,9 +15,9 @@ #define luaM_reallocv(L,b,on,n,e) \ - ((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \ - luaM_realloc_(L, (b), (on)*(e), (n)*(e)) : \ - (luaM_toobig(L), NULL)) + ((cast(size_t, (n)+1) > MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \ + (luaM_toobig(L), (void *)0) : \ + luaM_realloc_(L, (b), (on)*(e), (n)*(e))) #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) #define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) diff --git a/src/lparser.c b/src/lparser.c index c294a373..4d689365 100644 --- a/src/lparser.c +++ b/src/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.123 2011/11/30 12:43:51 roberto Exp $ +** $Id: lparser.c,v 2.124 2011/12/02 13:23:56 roberto Exp $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -330,7 +330,7 @@ static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) { static void enterlevel (LexState *ls) { lua_State *L = ls->L; ++L->nCcalls; - checklimit(ls->fs, L->nCcalls, LUAI_MAXCCALLS, "syntax levels"); + checklimit(ls->fs, L->nCcalls, LUAI_MAXCCALLS, "C levels"); } @@ -1147,8 +1147,8 @@ static void assignment (LexState *ls, struct LHS_assign *lh, int nvars) { primaryexp(ls, &nv.v); if (nv.v.k != VINDEXED) check_conflict(ls, lh, &nv.v); - checklimit(ls->fs, nvars, LUAI_MAXCCALLS - ls->L->nCcalls, - "variable names"); + checklimit(ls->fs, nvars + ls->L->nCcalls, LUAI_MAXCCALLS, + "C levels"); assignment(ls, &nv, nvars+1); } else { /* assignment -> `=' explist */ |