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