Skip to content

Commit a21e535

Browse files
committed
Merge pull request lipp#36 from ntd/pr2
Missing compatibility for Lua 5.2 bit operations
2 parents ee8f90f + 21f66e4 commit a21e535

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/websocket/bit.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
local has_bit32,bit = pcall(require,'bit32')
22
if has_bit32 then
33
-- lua 5.2
4+
bit.rol = bit32.lrotate
5+
bit.ror = bit32.rrotate
46
return bit
57
else
68
-- luajit / lua 5.1 + luabitop

0 commit comments

Comments
 (0)