diff options
author | Kim Alvefur <zash@zash.se> | 2025-01-15 09:55:28 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2025-01-15 09:55:28 +0100 |
commit | b53c7b03aa5276f0d3e453740247f6ca4a600dce (patch) | |
tree | ffd126fc43e2baeb1c701771d62f0612c9a85854 | |
parent | 918e8f51e82cd26898d0a3aa8d178ad50fc7e922 (diff) | |
download | prosody-b53c7b03aa5276f0d3e453740247f6ca4a600dce.tar.gz prosody-b53c7b03aa5276f0d3e453740247f6ca4a600dce.zip |
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.
-rw-r--r-- | util/bitcompat.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/bitcompat.lua b/util/bitcompat.lua index 43fd0f6e..537914a7 100644 --- a/util/bitcompat.lua +++ b/util/bitcompat.lua @@ -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 |