Software /
code /
prosody
Comparison
net/websocket/frames.lua @ 10241:48f7cda4174d
util.bitops: Library to find appropriate bitwise library (closes #1395)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 22 Jul 2019 01:58:57 +0200 |
parent | 9692:affcbccc1dff |
child | 11114:6a608ecb3471 |
comparison
equal
deleted
inserted
replaced
10240:a17f47d5e119 | 10241:48f7cda4174d |
---|---|
7 -- | 7 -- |
8 | 8 |
9 local softreq = require "util.dependencies".softreq; | 9 local softreq = require "util.dependencies".softreq; |
10 local random_bytes = require "util.random".bytes; | 10 local random_bytes = require "util.random".bytes; |
11 | 11 |
12 local bit = assert(softreq"bit32" or softreq"bit", | 12 local bit = require "util.bitcompat"; |
13 "No bit module found. See https://prosody.im/doc/depends#bitop"); | |
14 local band = bit.band; | 13 local band = bit.band; |
15 local bor = bit.bor; | 14 local bor = bit.bor; |
16 local bxor = bit.bxor; | 15 local bxor = bit.bxor; |
17 local lshift = bit.lshift; | 16 local lshift = bit.lshift; |
18 local rshift = bit.rshift; | 17 local rshift = bit.rshift; |