From 3dcfc5ee71761a90edbd32165725f38ffd323237 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 22 Jul 2019 01:58:57 +0200 Subject: util.bitops: Library to find appropriate bitwise library (closes #1395) --- util/bit53.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 util/bit53.lua (limited to 'util/bit53.lua') diff --git a/util/bit53.lua b/util/bit53.lua new file mode 100644 index 00000000..4b5c2e9c --- /dev/null +++ b/util/bit53.lua @@ -0,0 +1,7 @@ +-- Only the operators needed by net.websocket.frames are provided at this point +return { + band = function (a, b) return a & b end; + bor = function (a, b) return a | b end; + bxor = function (a, b) return a ~ b end; +}; + -- cgit v1.2.3