better syntax for type casts

This commit is contained in:
Roberto Ierusalimschy
2001-08-31 16:46:07 -03:00
parent 7651a5c6b2
commit e1d072571e
26 changed files with 148 additions and 141 deletions

View File

@@ -141,7 +141,7 @@ static int luaB_getglobal (lua_State *L) {
static int gettag (lua_State *L, int narg) {
switch (lua_rawtag(L, narg)) {
case LUA_TNUMBER:
return (int)lua_tonumber(L, narg);
return (int)(lua_tonumber(L, narg));
case LUA_TSTRING: {
const l_char *name = lua_tostring(L, narg);
int tag = lua_name2tag(L, name);