summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2011-12-05 12:00:00 +0000
committerrepogen <>2011-12-05 12:00:00 +0000
commit3a66913821e41b57d0f5e5f464d0b7b35b4cc131 (patch)
treeb35640d90c10aefe47e7822eb5de583d6fb94a64
parented0f7cc8d3f96dce4dac98bc395506f0513a332c (diff)
downloadlua-github-5.2.0-rc5.tar.gz
Lua 5.2.0-rc55.2.0-rc5
-rw-r--r--README2
-rw-r--r--doc/manual.html2
-rw-r--r--src/lauxlib.c6
-rw-r--r--src/lgc.c8
-rw-r--r--src/lmem.h8
-rw-r--r--src/lparser.c8
6 files changed, 17 insertions, 17 deletions
diff --git a/README b/README
index 3d7ba6dd..a69c642d 100644
--- a/README
+++ b/README
@@ -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 */
diff --git a/src/lgc.c b/src/lgc.c
index ac443eb2..cdd92e52 100644
--- a/src/lgc.c
+++ b/src/lgc.c
@@ -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 */
}
diff --git a/src/lmem.h b/src/lmem.h
index c8507126..535dfe07 100644
--- a/src/lmem.h
+++ b/src/lmem.h
@@ -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 */