Mercurial > prosody-hg
view util/bit53.lua @ 14207:23f1c71b3d56 13.0
net.unbound: Reset and apply new config on reload
Makes new configuration apply, which is otherwise somewhat tricky to do.
Also merges identical conditions into one block.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 30 May 2026 00:32:06 +0200 |
| parents | 9912baa541c0 |
| children |
line wrap: on
line source
-- Only the operators needed by net.websocket.frames are provided at this point return { band = function (a, b, ...) local ret = a & b; if ... then for i = 1, select("#", ...) do ret = ret & (select(i, ...)); end end return ret; end; bor = function (a, b, ...) local ret = a | b; if ... then for i = 1, select("#", ...) do ret = ret | (select(i, ...)); end end return ret; end; bxor = function (a, b, ...) local ret = a ~ b; if ... then for i = 1, select("#", ...) do ret = ret ~ (select(i, ...)); end end return ret; end; bnot = function (x) return ~x; end; rshift = function (a, n) return a >> n end; lshift = function (a, n) return a << n end; };
