Changeset

500:674daff6c73b

use util.bitcompat from Prosody for bitwise compat layer
author Kim Alvefur <zash@zash.se>
date Fri, 23 Jun 2023 12:26:43 +0200
parents 499:57417c37d018
children 501:419c248919e8
files squishy util/sha1.lua
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/squishy	Fri Jun 23 12:16:09 2023 +0200
+++ b/squishy	Fri Jun 23 12:26:43 2023 +0200
@@ -16,7 +16,8 @@
 	end
 
 	Module "util.sha1" "util/sha1.lua"
-	Module "util.bit" "libs/bit.lua"
+	Module "util.bitcompat" "libs/bitcompat.lua"
+	Module "util.bit53" "libs/bit53.lua"
 
 	Module "util.stanza" "util/stanza.lua"
 	Module "util.timer" "util/timer.lua"
@@ -117,6 +118,7 @@
 
 -- Verse-specific versions of libraries
 VerseModule "verse.util.adhoc" "libs/adhoc.lib.lua"
+VerseModule "verse.util.bit" "libs/bit.lua"
 VerseModule "verse.util.encodings" "libs/encodings.lua"
 VerseModule "verse.util.hashes" "libs/hashes.lua"
 VerseModule "verse.util.table" "libs/table.lua"
--- a/util/sha1.lua	Fri Jun 23 12:16:09 2023 +0200
+++ b/util/sha1.lua	Fri Jun 23 12:26:43 2023 +0200
@@ -13,7 +13,7 @@
 local strbyte = string.byte
 local strsub  = string.sub
 local floor   = math.floor
-local bit     = bit32 or require "prosody.util.bit"
+local bit     = require "prosody.util.bitcompat"
 local bnot    = bit.bnot
 local band    = bit.band
 local bor     = bit.bor