diff options
author | Kim Alvefur <zash@zash.se> | 2019-11-23 23:12:01 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-11-23 23:12:01 +0100 |
commit | 72f1544f6d7301d1313c333f1147b27e242063df (patch) | |
tree | 1a5b57117c8c88f05ebb8b67a0d2848988b7620c /net/websocket/frames.lua | |
parent | 7ac5e467baa7ebc557ed3a07bdca7dc9ade0c1db (diff) | |
parent | dfa2bdffc083faa597509d7f35125c41f6ffbc9d (diff) | |
download | prosody-72f1544f6d7301d1313c333f1147b27e242063df.tar.gz prosody-72f1544f6d7301d1313c333f1147b27e242063df.zip |
Merge 0.11->trunk
Diffstat (limited to 'net/websocket/frames.lua')
-rw-r--r-- | net/websocket/frames.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/websocket/frames.lua b/net/websocket/frames.lua index ba25d261..5e17df07 100644 --- a/net/websocket/frames.lua +++ b/net/websocket/frames.lua @@ -9,20 +9,20 @@ local softreq = require "util.dependencies".softreq; local random_bytes = require "util.random".bytes; -local bit = assert(softreq"bit" or softreq"bit32", - "No bit module found. See https://prosody.im/doc/depends#bitop"); +local bit = require "util.bitcompat"; local band = bit.band; local bor = bit.bor; local bxor = bit.bxor; local lshift = bit.lshift; local rshift = bit.rshift; +local unpack = table.unpack or unpack; -- luacheck: ignore 113 local t_concat = table.concat; local s_byte = string.byte; local s_char= string.char; local s_sub = string.sub; -local s_pack = string.pack; -- luacheck: ignore 143 -local s_unpack = string.unpack; -- luacheck: ignore 143 +local s_pack = string.pack; +local s_unpack = string.unpack; if not s_pack and softreq"struct" then s_pack = softreq"struct".pack; |