| 5889 | // LuaBitOp ends here |
| 5890 | |
| 5891 | static int bit_bshift_emulua(lua_State *L) |
| 5892 | { |
| 5893 | int shift = luaL_checkinteger(L,2); |
| 5894 | if (shift < 0) { |
| 5895 | lua_pushinteger(L, -shift); |
| 5896 | lua_replace(L, 2); |
| 5897 | return bit_lshift(L); |
| 5898 | } |
| 5899 | else |
| 5900 | return bit_rshift(L); |
| 5901 | } |
| 5902 | |
| 5903 | static int bitbit(lua_State *L) |
| 5904 | { |
nothing calls this directly
no test coverage detected