Showing the changes to src (4 of 7 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbitlib.c,v 1.11 2010/11/08 16:31:22 roberto Exp $ | 2 | ** $Id: lbitlib.c,v 1.13 2010/11/22 18:06:33 roberto Exp $ |
| 3 | ** Standard library for bitwise operations | 3 | ** Standard library for bitwise operations |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -130,27 +130,27 @@ static int b_rot (lua_State *L, int i) { · 124 unmodified lines | |||
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | 132 | ||
| 133 | static int b_rol (lua_State *L) { | 133 | static int b_lrot (lua_State *L) { |
| 134 | return b_rot(L, luaL_checkint(L, 2)); | 134 | return b_rot(L, luaL_checkint(L, 2)); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | 137 | ||
| 138 | static int b_ror (lua_State *L) { | 138 | static int b_rrot (lua_State *L) { |
| 139 | return b_rot(L, -luaL_checkint(L, 2)); | 139 | return b_rot(L, -luaL_checkint(L, 2)); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | 142 | ||
| 143 | static const luaL_Reg bitlib[] = { | 143 | static const luaL_Reg bitlib[] = { |
| 144 | {"AND", b_and}, | 144 | {"arshift", b_arshift}, |
| 145 | {"TEST", b_test}, | 145 | {"band", b_and}, |
| 146 | {"OR", b_or}, | 146 | {"bnot", b_not}, |
| 147 | {"XOR", b_xor}, | 147 | {"bor", b_or}, |
| 148 | {"NOT", b_not}, | 148 | {"bxor", b_xor}, |
| 149 | {"SHL", b_lshift}, | 149 | {"lrotate", b_lrot}, |
| 150 | {"SAR", b_arshift}, | 150 | {"lshift", b_lshift}, |
| 151 | {"SHR", b_rshift}, | 151 | {"rrotate", b_rrot}, |
| 152 | {"ROL", b_rol}, | 152 | {"rshift", b_rshift}, |
| 153 | {"ROR", b_ror}, | 153 | {"btest", b_test}, |
| 154 | {NULL, NULL} | 154 | {NULL, NULL} |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.c,v 2.40 2010/10/25 12:24:36 roberto Exp $ | 2 | ** $Id: llex.c,v 2.41 2010/11/18 18:38:44 roberto Exp $ |
| 3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -471,10 +471,10 @@ static int llex (LexState *ls, SemInfo *seminfo) { · 465 unmodified lines | |||
| 471 | } while (lislalnum(ls->current)); | 471 | } while (lislalnum(ls->current)); |
| 472 | ts = luaX_newstring(ls, luaZ_buffer(ls->buff), | 472 | ts = luaX_newstring(ls, luaZ_buffer(ls->buff), |
| 473 | luaZ_bufflen(ls->buff)); | 473 | luaZ_bufflen(ls->buff)); |
| 474 | seminfo->ts = ts; | ||
| 474 | if (ts->tsv.reserved > 0) /* reserved word? */ | 475 | if (ts->tsv.reserved > 0) /* reserved word? */ |
| 475 | return ts->tsv.reserved - 1 + FIRST_RESERVED; | 476 | return ts->tsv.reserved - 1 + FIRST_RESERVED; |
| 476 | else { | 477 | else { |
| 477 | seminfo->ts = ts; | ||
| 478 | return TK_NAME; | 478 | return TK_NAME; |
| 479 | } | 479 | } |
| 480 | } | 480 | } |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lmathlib.c,v 1.78 2010/11/12 15:47:34 roberto Exp $ | 2 | ** $Id: lmathlib.c,v 1.79 2010/11/18 18:38:27 roberto Exp $ |
| 3 | ** Standard mathematical library | 3 | ** Standard mathematical library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -136,11 +136,12 @@ static int math_log (lua_State *L) { · 130 unmodified lines | |||
| 136 | 136 | ||
| 137 | static int math_log10 (lua_State *L) { | 137 | static int math_log10 (lua_State *L) { |
| 138 | #if !defined(LUA_COMPAT_LOG10) | 138 | #if !defined(LUA_COMPAT_LOG10) |
| 139 | luaL_error(L, "function " LUA_QL("log10") | 139 | return luaL_error(L, "function " LUA_QL("log10") |
| 140 | " is deprecated; use log(x, 10) instead"); | 140 | " is deprecated; use log(x, 10) instead"); |
| 141 | #endif | 141 | #else |
| 142 | lua_pushnumber(L, l_tg(log10)(luaL_checknumber(L, 1))); | 142 | lua_pushnumber(L, l_tg(log10)(luaL_checknumber(L, 1))); |
| 143 | return 1; | 143 | return 1; |
| 144 | #endif | ||
| 144 | } | 145 | } |
| 145 | 146 | ||
| 146 | static int math_exp (lua_State *L) { | 147 | static int math_exp (lua_State *L) { |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.158 2010/11/16 20:39:41 roberto Exp $ | 2 | ** $Id: lstrlib.c,v 1.159 2010/11/19 16:25:51 roberto Exp $ |
| 3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -614,12 +614,6 @@ static int gmatch (lua_State *L) { · 608 unmodified lines | |||
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | 616 | ||
| 617 | static int gfind_nodef (lua_State *L) { | ||
| 618 | return luaL_error(L, LUA_QL("string.gfind") " was renamed to " | ||
| 619 | LUA_QL("string.gmatch")); | ||
| 620 | } | ||
| 621 | |||
| 622 | |||
| 623 | static void add_s (MatchState *ms, luaL_Buffer *b, const char *s, | 617 | static void add_s (MatchState *ms, luaL_Buffer *b, const char *s, |
| 624 | const char *e) { | 618 | const char *e) { |
| 625 | size_t l, i; | 619 | size_t l, i; |
| @@ -912,7 +906,6 @@ static const luaL_Reg strlib[] = { · 286 unmodified lines | |||
| 912 | {"dump", str_dump}, | 906 | {"dump", str_dump}, |
| 913 | {"find", str_find}, | 907 | {"find", str_find}, |
| 914 | {"format", str_format}, | 908 | {"format", str_format}, |
| 915 | {"gfind", gfind_nodef}, | ||
| 916 | {"gmatch", gmatch}, | 909 | {"gmatch", gmatch}, |
| 917 | {"gsub", str_gsub}, | 910 | {"gsub", str_gsub}, |
| 918 | {"len", str_len}, | 911 | {"len", str_len}, |