|
37 | 37 | #define BITS_32 0 |
38 | 38 | #endif |
39 | 39 |
|
40 | | -#if LUA_VERSION_NUM < 503 |
41 | | - #if BITS_32 |
42 | | - #define lua_pushunsigned(L, n) lua_pushnumber(L, n) |
43 | | - #else |
44 | | - #define lua_pushunsigned(L, n) lua_pushinteger(L, n) |
45 | | - #endif |
| 40 | +#if BITS_32 |
| 41 | + #define lua_pushunsigned(L, n) lua_pushnumber(L, n) |
| 42 | +#else |
| 43 | + #define lua_pushunsigned(L, n) lua_pushinteger(L, n) |
46 | 44 | #endif |
47 | 45 |
|
48 | 46 | /* ============================================================================= |
@@ -836,15 +834,15 @@ static int mp_unpack(lua_State *L) { |
836 | 834 | } |
837 | 835 |
|
838 | 836 | static int mp_unpack_one(lua_State *L) { |
839 | | - int offset = luaL_optint(L, 2, 0); |
| 837 | + int offset = luaL_optinteger(L, 2, 0); |
840 | 838 | /* Variable pop because offset may not exist */ |
841 | 839 | lua_pop(L, lua_gettop(L)-1); |
842 | 840 | return mp_unpack_full(L, 1, offset); |
843 | 841 | } |
844 | 842 |
|
845 | 843 | static int mp_unpack_limit(lua_State *L) { |
846 | | - int limit = luaL_checkint(L, 2); |
847 | | - int offset = luaL_optint(L, 3, 0); |
| 844 | + int limit = luaL_checkinteger(L, 2); |
| 845 | + int offset = luaL_optinteger(L, 3, 0); |
848 | 846 | /* Variable pop because offset may not exist */ |
849 | 847 | lua_pop(L, lua_gettop(L)-1); |
850 | 848 |
|
|
0 commit comments