diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-15 13:32:49 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-15 13:32:49 -0300 |
| commit | 037a70dfea9de66e8d27c8d3ce2ed9f159a1b094 (patch) | |
| tree | a31c77b6da44e543a1ec01f916e31d99fb64b238 /lapi.c | |
| parent | 8f961da3dbf8c45389d1431e6dff8e44e41f1a57 (diff) | |
| download | lua-037a70dfea9de66e8d27c8d3ce2ed9f159a1b094.tar.gz lua-037a70dfea9de66e8d27c8d3ce2ed9f159a1b094.tar.bz2 lua-037a70dfea9de66e8d27c8d3ce2ed9f159a1b094.zip | |
cast_u2s/cast_s2u renamed l_castS2U/l_castU2S to be configurable from
outside (mostly for testing)
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.203 2014/04/12 14:45:10 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.204 2014/04/15 14:29:30 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 | */ |
| @@ -376,7 +376,7 @@ LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *pisnum) { | |||
| 376 | int isnum = 0; | 376 | int isnum = 0; |
| 377 | switch (ttype(o)) { | 377 | switch (ttype(o)) { |
| 378 | case LUA_TNUMINT: { | 378 | case LUA_TNUMINT: { |
| 379 | res = cast_s2u(ivalue(o)); | 379 | res = l_castS2U(ivalue(o)); |
| 380 | isnum = 1; | 380 | isnum = 1; |
| 381 | break; | 381 | break; |
| 382 | } | 382 | } |
| @@ -514,7 +514,7 @@ LUA_API void lua_pushinteger (lua_State *L, lua_Integer n) { | |||
| 514 | 514 | ||
| 515 | LUA_API void lua_pushunsigned (lua_State *L, lua_Unsigned u) { | 515 | LUA_API void lua_pushunsigned (lua_State *L, lua_Unsigned u) { |
| 516 | lua_lock(L); | 516 | lua_lock(L); |
| 517 | setivalue(L->top, cast_u2s(u)); | 517 | setivalue(L->top, l_castU2S(u)); |
| 518 | api_incr_top(L); | 518 | api_incr_top(L); |
| 519 | lua_unlock(L); | 519 | lua_unlock(L); |
| 520 | } | 520 | } |
