diff options
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 2.78 2014/04/11 19:52:26 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.79 2014/04/15 14:28:20 roberto Exp roberto $ |
3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -85,7 +85,7 @@ static lua_Integer intarith (lua_State *L, int op, lua_Integer v1, | |||
85 | case LUA_OPSHL: return luaV_shiftl(v1, v2); | 85 | case LUA_OPSHL: return luaV_shiftl(v1, v2); |
86 | case LUA_OPSHR: return luaV_shiftl(v1, -v2); | 86 | case LUA_OPSHR: return luaV_shiftl(v1, -v2); |
87 | case LUA_OPUNM: return intop(-, 0, v1); | 87 | case LUA_OPUNM: return intop(-, 0, v1); |
88 | case LUA_OPBNOT: return intop(^, ~cast_s2u(0), v1); | 88 | case LUA_OPBNOT: return intop(^, ~l_castS2U(0), v1); |
89 | default: lua_assert(0); return 0; | 89 | default: lua_assert(0); return 0; |
90 | } | 90 | } |
91 | } | 91 | } |
@@ -291,7 +291,7 @@ int luaO_str2int (const char *s, size_t len, lua_Integer *result) { | |||
291 | while (lisspace(cast_uchar(*s))) s++; /* skip trailing spaces */ | 291 | while (lisspace(cast_uchar(*s))) s++; /* skip trailing spaces */ |
292 | if (empty || s != ends) return 0; /* something wrong in the numeral */ | 292 | if (empty || s != ends) return 0; /* something wrong in the numeral */ |
293 | else { | 293 | else { |
294 | *result = cast_u2s((neg) ? 0u - a : a); | 294 | *result = l_castU2S((neg) ? 0u - a : a); |
295 | return 1; | 295 | return 1; |
296 | } | 296 | } |
297 | } | 297 | } |