diff net/websocket/frames.lua @ 11200:bf8f2da84007

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 05 Nov 2020 22:31:25 +0100
parents 51e5149ed0ad
children 2d3080d02960
line wrap: on
line diff
--- a/net/websocket/frames.lua	Thu Nov 05 22:27:17 2020 +0100
+++ b/net/websocket/frames.lua	Thu Nov 05 22:31:25 2020 +0100
@@ -9,8 +9,7 @@
 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 lshift = bit.lshift;
@@ -19,8 +18,8 @@
 local sxor = sbit.sxor;
 
 local s_char= string.char;
-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;