aboutsummaryrefslogtreecommitdiffstats
path: root/util/serialization.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/serialization.lua')
-rw-r--r--util/serialization.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/util/serialization.lua b/util/serialization.lua
index d310a3e8..1f06ea54 100644
--- a/util/serialization.lua
+++ b/util/serialization.lua
@@ -16,15 +16,17 @@ local s_char = string.char;
local s_match = string.match;
local t_concat = table.concat;
-local to_hex = require "util.hex".to;
+local to_hex = require "prosody.util.hex".to;
local pcall = pcall;
-local envload = require"util.envload".envload;
+local envload = require"prosody.util.envload".envload;
+
+if not math.type then
+ require "prosody.util.mathcompat"
+end
local pos_inf, neg_inf = math.huge, -math.huge;
-local m_type = math.type or function (n)
- return n % 1 == 0 and n <= 9007199254740992 and n >= -9007199254740992 and "integer" or "float";
-end;
+local m_type = math.type;
local function rawpairs(t)
return next, t, nil;