diff options
author | Kim Alvefur <zash@zash.se> | 2021-06-28 03:56:45 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-06-28 03:56:45 +0200 |
commit | 27943c671cab85e37cac86e96f9bd0a064c1c689 (patch) | |
tree | 77e8e628d5a10077c5ed174a12bcbed1a468e3c4 | |
parent | e01f2cf25fa35e6525dd12d6063d53065d2d8c33 (diff) | |
download | prosody-27943c671cab85e37cac86e96f9bd0a064c1c689.tar.gz prosody-27943c671cab85e37cac86e96f9bd0a064c1c689.zip |
util.bit53: Add left- and right shift operations
While not used by anything in Prosody, it is known to be used by some
3rd party modules.
-rw-r--r-- | util/bit53.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/bit53.lua b/util/bit53.lua index 4b5c2e9c..06799a97 100644 --- a/util/bit53.lua +++ b/util/bit53.lua @@ -3,5 +3,7 @@ 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; + rshift = function (a, n) return a >> n end; + lshift = function (a, n) return a << n end; }; |