diff options
author | Lua Team <team@lua.org> | 2013-02-22 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2013-02-22 12:00:00 +0000 |
commit | 00ce46285bde86085185308a4197c15bc0b642bd (patch) | |
tree | c7fb6830788bc4a1ae94866856119756b55cd694 /src | |
parent | b1e682aa2f5a272036f823e7861a6e973a976636 (diff) | |
download | lua-github-00ce46285bde86085185308a4197c15bc0b642bd.tar.gz |
Lua 5.2.2-rc25.2.2-rc2
Diffstat (limited to 'src')
-rw-r--r-- | src/lbaselib.c | 5 | ||||
-rw-r--r-- | src/lbitlib.c | 4 | ||||
-rw-r--r-- | src/lcorolib.c | 4 | ||||
-rw-r--r-- | src/llimits.h | 4 | ||||
-rw-r--r-- | src/lmem.h | 4 | ||||
-rw-r--r-- | src/lobject.c | 4 |
6 files changed, 13 insertions, 12 deletions
diff --git a/src/lbaselib.c b/src/lbaselib.c index 983ca712..540e9a5c 100644 --- a/src/lbaselib.c +++ b/src/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.275 2012/12/03 20:18:02 roberto Exp $ +** $Id: lbaselib.c,v 1.276 2013/02/21 13:44:53 roberto Exp $ ** Basic library ** See Copyright Notice in lua.h */ @@ -336,7 +336,8 @@ static int dofilecont (lua_State *L) { static int luaB_dofile (lua_State *L) { const char *fname = luaL_optstring(L, 1, NULL); lua_settop(L, 1); - if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L); + if (luaL_loadfile(L, fname) != LUA_OK) + return lua_error(L); lua_callk(L, 0, LUA_MULTRET, 0, dofilecont); return dofilecont(L); } diff --git a/src/lbitlib.c b/src/lbitlib.c index 7533b85c..9cd91474 100644 --- a/src/lbitlib.c +++ b/src/lbitlib.c @@ -1,5 +1,5 @@ /* -** $Id: lbitlib.c,v 1.16 2011/06/20 16:35:23 roberto Exp $ +** $Id: lbitlib.c,v 1.17 2013/02/21 13:44:53 roberto Exp $ ** Standard library for bitwise operations ** See Copyright Notice in lua.h */ @@ -155,7 +155,7 @@ static int fieldargs (lua_State *L, int farg, int *width) { luaL_argcheck(L, 0 <= f, farg, "field cannot be negative"); luaL_argcheck(L, 0 < w, farg + 1, "width must be positive"); if (f + w > LUA_NBITS) - luaL_error(L, "trying to access non-existent bits"); + return luaL_error(L, "trying to access non-existent bits"); *width = w; return f; } diff --git a/src/lcorolib.c b/src/lcorolib.c index c7932d90..1326c814 100644 --- a/src/lcorolib.c +++ b/src/lcorolib.c @@ -1,5 +1,5 @@ /* -** $Id: lcorolib.c,v 1.4 2012/04/27 18:59:04 roberto Exp $ +** $Id: lcorolib.c,v 1.5 2013/02/21 13:44:53 roberto Exp $ ** Coroutine Library ** See Copyright Notice in lua.h */ @@ -73,7 +73,7 @@ static int luaB_auxwrap (lua_State *L) { lua_insert(L, -2); lua_concat(L, 2); } - lua_error(L); /* propagate error */ + return lua_error(L); /* propagate error */ } return r; } diff --git a/src/llimits.h b/src/llimits.h index 1eee9933..1b8c79bd 100644 --- a/src/llimits.h +++ b/src/llimits.h @@ -1,5 +1,5 @@ /* -** $Id: llimits.h,v 1.102 2013/01/29 16:00:40 roberto Exp $ +** $Id: llimits.h,v 1.103 2013/02/20 14:08:56 roberto Exp $ ** Limits, basic types, and some other `installation-dependent' definitions ** See Copyright Notice in lua.h */ @@ -282,7 +282,7 @@ union luai_Cast { double l_d; LUA_INT32 l_p[2]; }; #include <math.h> #define luai_hashnum(i,n) { int e; \ - n = l_tg(frexp)(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP); \ + n = l_mathop(frexp)(n, &e) * (lua_Number)(INT_MAX - DBL_MAX_EXP); \ lua_number2int(i, n); i += e; } #endif @@ -1,5 +1,5 @@ /* -** $Id: lmem.h,v 1.39 2012/11/14 17:21:34 roberto Exp $ +** $Id: lmem.h,v 1.40 2013/02/20 14:08:21 roberto Exp $ ** Interface to Memory Manager ** See Copyright Notice in lua.h */ @@ -18,7 +18,7 @@ ** This macro avoids the runtime division MAX_SIZET/(e), as 'e' is ** always constant. ** The macro is somewhat complex to avoid warnings: -** +1 avoids warnings of "comparsion has constant result"; +** +1 avoids warnings of "comparison has constant result"; ** cast to 'void' avoids warnings of "value unused". */ #define luaM_reallocv(L,b,on,n,e) \ diff --git a/src/lobject.c b/src/lobject.c index d82510bd..c152785a 100644 --- a/src/lobject.c +++ b/src/lobject.c @@ -1,5 +1,5 @@ /* -** $Id: lobject.c,v 2.57 2013/01/29 16:00:40 roberto Exp $ +** $Id: lobject.c,v 2.58 2013/02/20 14:08:56 roberto Exp $ ** Some generic functions over Lua objects ** See Copyright Notice in lua.h */ @@ -149,7 +149,7 @@ static lua_Number lua_strx2number (const char *s, char **endptr) { *endptr = cast(char *, s); /* valid up to here */ ret: if (neg) r = -r; - return l_tg(ldexp)(r, e); + return l_mathop(ldexp)(r, e); } #endif |