diff options
| author | Lua Team <team@lua.org> | 2010-01-14 12:00:00 +0000 |
|---|---|---|
| committer | repogen <> | 2010-01-14 12:00:00 +0000 |
| commit | ecd48c2901f08a88db32139b97c35c59eba1f19e (patch) | |
| tree | 526e8dac3e037de0024b37c89fa3150baeea969f /src/lapi.c | |
| parent | 22912c77c80f8de8f7accd3319c726f7c5349fd3 (diff) | |
| download | lua-github-ecd48c2901f08a88db32139b97c35c59eba1f19e.tar.gz | |
Lua 5.2.0-work25.2.0-work2
Diffstat (limited to 'src/lapi.c')
| -rw-r--r-- | src/lapi.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.109 2010/01/08 15:16:56 roberto Exp $ +** $Id: lapi.c,v 2.111 2010/01/13 16:18:25 roberto Exp $ ** Lua API ** See Copyright Notice in lua.h */ @@ -255,7 +255,7 @@ LUA_API int lua_type (lua_State *L, int idx) { LUA_API const char *lua_typename (lua_State *L, int t) { UNUSED(L); - return (t == LUA_TNONE) ? "no value" : luaT_typenames[t]; + return typename(t); } @@ -300,7 +300,8 @@ LUA_API void lua_arith (lua_State *L, int op) { luaO_arith(op, nvalue(L->top - 2), nvalue(L->top - 1))); } else - luaV_arith(L, L->top - 2, L->top - 2, L->top - 1, op - LUA_OPADD + TM_ADD); + luaV_arith(L, L->top - 2, L->top - 2, L->top - 1, + cast(TMS, op - LUA_OPADD + TM_ADD)); L->top--; lua_unlock(L); } |
