diff options
author | Kim Alvefur <zash@zash.se> | 2023-06-17 17:17:44 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-06-17 17:17:44 +0200 |
commit | f0242ae57c14ed1417a80e475784aaaded04dfe4 (patch) | |
tree | c3f3dff490d24f46eba3df7f49a0a526be5f8edb /teal-src/prosody | |
parent | c8b5d7e99aa6df7aea56540e6a8ecf3d3bf513b4 (diff) | |
download | prosody-f0242ae57c14ed1417a80e475784aaaded04dfe4.tar.gz prosody-f0242ae57c14ed1417a80e475784aaaded04dfe4.zip |
util.jsonschema: Silence Teal warnings about utf8 library
Teal worries that we redefine the global.
Also that the fallback was missing type information.
Diffstat (limited to 'teal-src/prosody')
-rw-r--r-- | teal-src/prosody/util/jsonschema.tl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/teal-src/prosody/util/jsonschema.tl b/teal-src/prosody/util/jsonschema.tl index 0971c548..5a1b0e92 100644 --- a/teal-src/prosody/util/jsonschema.tl +++ b/teal-src/prosody/util/jsonschema.tl @@ -11,8 +11,8 @@ if not math.type then require "prosody.util.mathcompat" end -local utf8 = rawget(_G, "utf8") or require"prosody.util.encodings".utf8; -local utf8_len = utf8.len or function(s) +local utf8_enc = rawget(_G, "utf8") or require"prosody.util.encodings".utf8; +local utf8_len = utf8_enc.len or function(s : string) : integer local _, count = s:gsub("[%z\001-\127\194-\253][\128-\191]*", ""); return count; end; |