diff options
author | Kim Alvefur <zash@zash.se> | 2019-07-08 02:44:32 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-07-08 02:44:32 +0200 |
commit | f2b49140d8f9309bb3613effbef0739216ba7a9b (patch) | |
tree | 6b13265c066c8c32f4ed5d44fc9ca8421d118d06 /net/websocket/frames.lua | |
parent | e081fd664251a2eb7ab68262c2b8a3cad4b381c7 (diff) | |
parent | ae48864f9d7368bf2030d391d68d6363278202ea (diff) | |
download | prosody-f2b49140d8f9309bb3613effbef0739216ba7a9b.tar.gz prosody-f2b49140d8f9309bb3613effbef0739216ba7a9b.zip |
Merge 0.11->trunk
Diffstat (limited to 'net/websocket/frames.lua')
-rw-r--r-- | net/websocket/frames.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/websocket/frames.lua b/net/websocket/frames.lua index ba25d261..86752109 100644 --- a/net/websocket/frames.lua +++ b/net/websocket/frames.lua @@ -9,20 +9,21 @@ local softreq = require "util.dependencies".softreq; local random_bytes = require "util.random".bytes; -local bit = assert(softreq"bit" or softreq"bit32", +local bit = assert(softreq"bit32" or softreq"bit", "No bit module found. See https://prosody.im/doc/depends#bitop"); 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; |