# HG changeset patch # User Kim Alvefur # Date 1736931328 -3600 # Node ID de902cc0d46c569904af9584394b2db0866b4f1d # Parent e226f9632a48dbd195e722d2af2cdf59b623bc1c util.bitcompat: Avoid potential noise from global metatable If this module is require'd from a plugin on a Lua version without the global bit32 library, it may trip a warning about accessing globals. diff -r e226f9632a48 -r de902cc0d46c util/bitcompat.lua --- a/util/bitcompat.lua Tue Jan 14 12:26:14 2025 +0000 +++ b/util/bitcompat.lua Wed Jan 15 09:55:28 2025 +0100 @@ -3,7 +3,7 @@ -- First try the bit32 lib -- Lua 5.3 has it with compat enabled -- Lua 5.2 has it by default -if _G.bit32 then +if rawget(_G, "bit32") then return _G.bit32; end