projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6438174
)
net.websocket.frames: Simplify import of bitlib
author
Kim Alvefur
<zash@zash.se>
Tue, 6 Oct 2015 14:06:22 +0000
(16:06 +0200)
committer
Kim Alvefur
<zash@zash.se>
Tue, 6 Oct 2015 14:06:22 +0000
(16:06 +0200)
net/websocket/frames.lua
patch
|
blob
|
history
diff --git
a/net/websocket/frames.lua
b/net/websocket/frames.lua
index fa0e130d31e8c1addec33350b999c1e5a4d68a28..23f1843776c007666671d38cfb4bf61e0e76ee7c 100644
(file)
--- a/
net/websocket/frames.lua
+++ b/
net/websocket/frames.lua
@@
-10,9
+10,7
@@
local softreq = require "util.dependencies".softreq;
local log = require "util.logger".init "websocket.frames";
local random_bytes = require "util.random".bytes;
-local bit;
-pcall(function() bit = require"bit"; end);
-bit = bit or softreq"bit32"
+local bit = softreq"bit" or softreq"bit32";
if not bit then log("error", "No bit module found. Either LuaJIT 2, lua-bitop or Lua 5.2 is required"); end
local band = bit.band;
local bor = bit.bor;