diff options
| author | Lua Team <team@lua.org> | 2010-11-22 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 2010-11-22 12:00:00 +0000 |
| commit | fb0603dc21768ef06c36dfebe3e812010cbb759a (patch) | |
| tree | 9f2613bf0fdb20f9354032bd956f4e0ff1018adc /src | |
| parent | 850a3d8f8d2ef75c2e7579f31e3b301a72c279cd (diff) | |
| download | lua-github-fb0603dc21768ef06c36dfebe3e812010cbb759a.tar.gz | |
Lua 5.2.0-alpha-rc35.2.0-alpha-rc3
Diffstat (limited to 'src')
| -rw-r--r-- | src/lbitlib.c | 26 | ||||
| -rw-r--r-- | src/llex.c | 4 | ||||
| -rw-r--r-- | src/lmathlib.c | 9 | ||||
| -rw-r--r-- | src/lstrlib.c | 9 |
4 files changed, 21 insertions, 27 deletions
diff --git a/src/lbitlib.c b/src/lbitlib.c index b37344f3..35879000 100644 --- a/src/lbitlib.c +++ b/src/lbitlib.c @@ -1,5 +1,5 @@ /* -** $Id: lbitlib.c,v 1.11 2010/11/08 16:31:22 roberto Exp $ +** $Id: lbitlib.c,v 1.13 2010/11/22 18:06:33 roberto Exp $ ** Standard library for bitwise operations ** See Copyright Notice in lua.h */ @@ -130,27 +130,27 @@ static int b_rot (lua_State *L, int i) { } -static int b_rol (lua_State *L) { +static int b_lrot (lua_State *L) { return b_rot(L, luaL_checkint(L, 2)); } -static int b_ror (lua_State *L) { +static int b_rrot (lua_State *L) { return b_rot(L, -luaL_checkint(L, 2)); } static const luaL_Reg bitlib[] = { - {"AND", b_and}, - {"TEST", b_test}, - {"OR", b_or}, - {"XOR", b_xor}, - {"NOT", b_not}, - {"SHL", b_lshift}, - {"SAR", b_arshift}, - {"SHR", b_rshift}, - {"ROL", b_rol}, - {"ROR", b_ror}, + {"arshift", b_arshift}, + {"band", b_and}, + {"bnot", b_not}, + {"bor", b_or}, + {"bxor", b_xor}, + {"lrotate", b_lrot}, + {"lshift", b_lshift}, + {"rrotate", b_rrot}, + {"rshift", b_rshift}, + {"btest", b_test}, {NULL, NULL} }; @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 2.40 2010/10/25 12:24:36 roberto Exp $ +** $Id: llex.c,v 2.41 2010/11/18 18:38:44 roberto Exp $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -471,10 +471,10 @@ static int llex (LexState *ls, SemInfo *seminfo) { } while (lislalnum(ls->current)); ts = luaX_newstring(ls, luaZ_buffer(ls->buff), luaZ_bufflen(ls->buff)); + seminfo->ts = ts; if (ts->tsv.reserved > 0) /* reserved word? */ return ts->tsv.reserved - 1 + FIRST_RESERVED; else { - seminfo->ts = ts; return TK_NAME; } } diff --git a/src/lmathlib.c b/src/lmathlib.c index 8494d80d..1127fd51 100644 --- a/src/lmathlib.c +++ b/src/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.78 2010/11/12 15:47:34 roberto Exp $ +** $Id: lmathlib.c,v 1.79 2010/11/18 18:38:27 roberto Exp $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -136,11 +136,12 @@ static int math_log (lua_State *L) { static int math_log10 (lua_State *L) { #if !defined(LUA_COMPAT_LOG10) - luaL_error(L, "function " LUA_QL("log10") - " is deprecated; use log(x, 10) instead"); -#endif + return luaL_error(L, "function " LUA_QL("log10") + " is deprecated; use log(x, 10) instead"); +#else lua_pushnumber(L, l_tg(log10)(luaL_checknumber(L, 1))); return 1; +#endif } static int math_exp (lua_State *L) { diff --git a/src/lstrlib.c b/src/lstrlib.c index 82c2005e..2491bbb4 100644 --- a/src/lstrlib.c +++ b/src/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.158 2010/11/16 20:39:41 roberto Exp $ +** $Id: lstrlib.c,v 1.159 2010/11/19 16:25:51 roberto Exp $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -614,12 +614,6 @@ static int gmatch (lua_State *L) { } -static int gfind_nodef (lua_State *L) { - return luaL_error(L, LUA_QL("string.gfind") " was renamed to " - LUA_QL("string.gmatch")); -} - - static void add_s (MatchState *ms, luaL_Buffer *b, const char *s, const char *e) { size_t l, i; @@ -912,7 +906,6 @@ static const luaL_Reg strlib[] = { {"dump", str_dump}, {"find", str_find}, {"format", str_format}, - {"gfind", gfind_nodef}, {"gmatch", gmatch}, {"gsub", str_gsub}, {"len", str_len}, |
