Software /
code /
prosody
Diff
util/serialization.lua @ 12782:8815d3090928
util.mathcompat: Module to ease reuse of math.type()
Mostly to ensure it is available during tests, as util.startup is not
invoked there
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 20 Oct 2022 16:50:12 +0200 |
parent | 12781:22066b02887f |
child | 12975:d10957394a3c |
line wrap: on
line diff
--- a/util/serialization.lua Wed Oct 19 16:25:05 2022 +0200 +++ b/util/serialization.lua Thu Oct 20 16:50:12 2022 +0200 @@ -21,6 +21,10 @@ local pcall = pcall; local envload = require"util.envload".envload; +if not math.type then + require "util.mathcompat" +end + local pos_inf, neg_inf = math.huge, -math.huge; local m_type = math.type;