diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-11 15:38:30 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-11 15:38:30 -0200 |
| commit | cef96b73e1820e0f0d65f1616284ec40502e5e44 (patch) | |
| tree | 7036713ddbf9fe30e363c5092e38e14cbc95d47a /lapi.c | |
| parent | 427e01eb63079e8cf3a41ec03e7aad7d79fc6406 (diff) | |
| download | lua-cef96b73e1820e0f0d65f1616284ec40502e5e44.tar.gz lua-cef96b73e1820e0f0d65f1616284ec40502e5e44.tar.bz2 lua-cef96b73e1820e0f0d65f1616284ec40502e5e44.zip | |
added casts from int to enumerations to follow C++ rules
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.108 2010/01/04 18:17:51 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.109 2010/01/08 15:16:56 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -300,7 +300,8 @@ LUA_API void lua_arith (lua_State *L, int op) { | |||
| 300 | luaO_arith(op, nvalue(L->top - 2), nvalue(L->top - 1))); | 300 | luaO_arith(op, nvalue(L->top - 2), nvalue(L->top - 1))); |
| 301 | } | 301 | } |
| 302 | else | 302 | else |
| 303 | luaV_arith(L, L->top - 2, L->top - 2, L->top - 1, op - LUA_OPADD + TM_ADD); | 303 | luaV_arith(L, L->top - 2, L->top - 2, L->top - 1, |
| 304 | cast(TMS, op - LUA_OPADD + TM_ADD)); | ||
| 304 | L->top--; | 305 | L->top--; |
| 305 | lua_unlock(L); | 306 | lua_unlock(L); |
| 306 | } | 307 | } |
