Software /
code /
prosody
Comparison
util/format.lua @ 12975:d10957394a3c
util: Prefix module imports with prosody namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Mar 2023 16:23:16 +0100 |
parent | 12781:22066b02887f |
child | 12983:4533c9b906b0 |
comparison
equal
deleted
inserted
replaced
12974:ba409c67353b | 12975:d10957394a3c |
---|---|
6 -- Provides some protection from e.g. CAPEC-135, CWE-117, CWE-134, CWE-93 | 6 -- Provides some protection from e.g. CAPEC-135, CWE-117, CWE-134, CWE-93 |
7 | 7 |
8 local tostring = tostring; | 8 local tostring = tostring; |
9 local unpack = table.unpack; | 9 local unpack = table.unpack; |
10 local pack = table.pack; | 10 local pack = table.pack; |
11 local valid_utf8 = require "util.encodings".utf8.valid; | 11 local valid_utf8 = require "prosody.util.encodings".utf8.valid; |
12 local type = type; | 12 local type = type; |
13 local dump = require "util.serialization".new("debug"); | 13 local dump = require "prosody.util.serialization".new("debug"); |
14 local num_type = math.type; | 14 local num_type = math.type; |
15 | 15 |
16 -- In Lua 5.3+ these formats throw an error if given a float | 16 -- In Lua 5.3+ these formats throw an error if given a float |
17 local expects_integer = { c = true, d = true, i = true, o = true, u = true, X = true, x = true, }; | 17 local expects_integer = { c = true, d = true, i = true, o = true, u = true, X = true, x = true, }; |
18 -- In Lua 5.2 these throw an error given a negative number | 18 -- In Lua 5.2 these throw an error given a negative number |