diff options
author | Lua Team <team@lua.org> | 2011-12-07 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2011-12-07 12:00:00 +0000 |
commit | fc12b5930ac0e8393f43fa7b78829e19a7a1da20 (patch) | |
tree | 9c44c157e34d6c1d1d2c97ba465b09ecce5d45b0 | |
parent | 3a66913821e41b57d0f5e5f464d0b7b35b4cc131 (diff) | |
download | lua-github-fc12b5930ac0e8393f43fa7b78829e19a7a1da20.tar.gz |
Lua 5.2.0-rc65.2.0-rc6
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | doc/manual.html | 19 | ||||
-rw-r--r-- | src/lauxlib.c | 4 | ||||
-rw-r--r-- | src/llimits.h | 4 | ||||
-rw-r--r-- | src/luaconf.h | 15 | ||||
-rw-r--r-- | src/lundump.c | 6 | ||||
-rw-r--r-- | src/lvm.c | 4 |
7 files changed, 25 insertions, 29 deletions
@@ -1,5 +1,5 @@ -This is Lua 5.2, released on 05 Dec 2011. +This is Lua 5.2, released on 07 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 1fbc8260..cd7829dd 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -33,7 +33,7 @@ Freely available under the terms of the <!-- ====================================================================== --> <p> -<!-- $Id: manual.of,v 1.91 2011/11/30 18:26:32 roberto Exp $ --> +<!-- $Id: manual.of,v 1.92 2011/12/06 17:58:43 roberto Exp $ --> @@ -2707,6 +2707,14 @@ never returning <p> +The panic function runs as if it were a message handler (see <a href="#2.3">§2.3</a>); +in particular, the error message is at the top of the stack. +However, there is no guarantees about stack space. +To push anything on the stack, +the panic function should first check the available space (see <a href="#4.2">§4.2</a>). + + +<p> Most functions in the API can throw an error, for instance due to a memory allocation error. The documentation for each function indicates whether @@ -2952,13 +2960,6 @@ The value of <code>op</code> must be one of the following constants: Sets a new panic function and returns the old one (see <a href="#4.6">§4.6</a>). -<p> -The panic function should not try to run anything on the failed Lua state. -However, it can still use the debug API (see <a href="#4.9">§4.9</a>) -to gather information about the state. -In particular, the error message is at the top of the stack. - - @@ -10382,7 +10383,7 @@ Here is the complete syntax of Lua in extended BNF. <HR> <SMALL CLASS="footer"> Last update: -Mon Dec 5 11:07:57 BRST 2011 +Wed Dec 7 16:31:58 BRST 2011 </SMALL> <!-- Last change: revised for Lua 5.2.0 diff --git a/src/lauxlib.c b/src/lauxlib.c index 4c044f9d..0aa80fd9 100644 --- a/src/lauxlib.c +++ b/src/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.239 2011/12/02 13:25:57 roberto Exp $ +** $Id: lauxlib.c,v 1.240 2011/12/06 16:33:55 roberto Exp $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -944,7 +944,7 @@ LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver) { if (v != lua_version(NULL)) luaL_error(L, "multiple Lua VMs detected"); else if (*v != ver) - luaL_error(L, "version mismatch: app. needs %d, Lua core provides %f", + luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f", ver, *v); /* check conversions number -> integer types */ lua_pushnumber(L, -(lua_Number)0x1234); diff --git a/src/llimits.h b/src/llimits.h index ec2ca896..48dc81f7 100644 --- a/src/llimits.h +++ b/src/llimits.h @@ -1,5 +1,5 @@ /* -** $Id: llimits.h,v 1.94 2011/11/29 15:39:48 roberto Exp $ +** $Id: llimits.h,v 1.95 2011/12/06 16:58:36 roberto Exp $ ** Limits, basic types, and some other `installation-dependent' definitions ** See Copyright Notice in lua.h */ @@ -269,7 +269,7 @@ union luai_Cast { double l_d; LUA_INT32 l_p[2]; }; -#if (defined(ltable_c) || defined(luaall_c)) && !defined(luai_hashnum) +#if defined(ltable_c) && !defined(luai_hashnum) #include <float.h> #include <math.h> diff --git a/src/luaconf.h b/src/luaconf.h index 5b38be6d..bab401e9 100644 --- a/src/luaconf.h +++ b/src/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.169 2011/11/30 12:35:05 roberto Exp $ +** $Id: luaconf.h,v 1.170 2011/12/06 16:58:36 roberto Exp $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -174,13 +174,8 @@ ** give a warning about it. To avoid these warnings, change to the ** default definition. */ -#if defined(luaall_c) /* { */ -#define LUAI_FUNC static -#define LUAI_DDEC static -#define LUAI_DDEF static - -#elif defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ - defined(__ELF__) +#if defined(__GNUC__) && ((__GNUC__*100 + __GNUC_MINOR__) >= 302) && \ + defined(__ELF__) /* { */ #define LUAI_FUNC __attribute__((visibility("hidden"))) extern #define LUAI_DDEC LUAI_FUNC #define LUAI_DDEF /* empty */ @@ -214,7 +209,7 @@ ** They are only used in libraries and the stand-alone program. (The #if ** avoids including 'stdio.h' everywhere.) */ -#if defined(LUA_LIB) || defined(lua_c) || defined(luaall_c) +#if defined(LUA_LIB) || defined(lua_c) #include <stdio.h> #define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout) #define luai_writeline() (luai_writestring("\n", 1), fflush(stdout)) @@ -423,7 +418,7 @@ */ /* the following operations need the math library */ -#if defined(lobject_c) || defined(lvm_c) || defined(luaall_c) +#if defined(lobject_c) || defined(lvm_c) #include <math.h> #define luai_nummod(L,a,b) ((a) - floor((a)/(b))*(b)) #define luai_numpow(L,a,b) (pow(a,b)) diff --git a/src/lundump.c b/src/lundump.c index d7b0ab3b..80c7aa39 100644 --- a/src/lundump.c +++ b/src/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 1.70 2011/06/21 12:29:00 lhf Exp $ +** $Id: lundump.c,v 1.71 2011/12/07 10:39:12 lhf Exp $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -136,8 +136,8 @@ static void LoadUpvalues(LoadState* S, Proto* f) for (i=0; i<n; i++) f->upvalues[i].name=NULL; for (i=0; i<n; i++) { - f->upvalues[i].instack=LoadChar(S); - f->upvalues[i].idx=LoadChar(S); + f->upvalues[i].instack=LoadByte(S); + f->upvalues[i].idx=LoadByte(S); } } @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.146 2011/11/29 15:54:38 roberto Exp $ +** $Id: lvm.c,v 2.147 2011/12/07 14:43:55 roberto Exp $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -662,7 +662,7 @@ void luaV_execute (lua_State *L) { TValue *rb = RKB(i); TValue *rc = RKC(i); Protect( - if (equalobj(L, rb, rc) != GETARG_A(i)) + if (cast_int(equalobj(L, rb, rc)) != GETARG_A(i)) ci->u.l.savedpc++; else donextjump(ci); |