| 766 | #define luaV_shiftr(x,y) luaV_shiftl(x,-(y)) |
| 767 | |
| 768 | lua_Integer luaV_shiftl (lua_Integer x, lua_Integer y) { |
| 769 | if (y < 0) { /* shift right? */ |
| 770 | if (y <= -NBITS) return 0; |
| 771 | else return intop(>>, x, -y); |
| 772 | } |
| 773 | else { /* shift left */ |
| 774 | if (y >= NBITS) return 0; |
| 775 | else return intop(<<, x, y); |
| 776 | } |
| 777 | } |
| 778 | |
| 779 | |
| 780 | /* |
no outgoing calls
no test coverage detected