Comparison

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
comparison
equal deleted inserted replaced
12781:22066b02887f 12782:8815d3090928
18 18
19 local to_hex = require "util.hex".to; 19 local to_hex = require "util.hex".to;
20 20
21 local pcall = pcall; 21 local pcall = pcall;
22 local envload = require"util.envload".envload; 22 local envload = require"util.envload".envload;
23
24 if not math.type then
25 require "util.mathcompat"
26 end
23 27
24 local pos_inf, neg_inf = math.huge, -math.huge; 28 local pos_inf, neg_inf = math.huge, -math.huge;
25 local m_type = math.type; 29 local m_type = math.type;
26 30
27 local function rawpairs(t) 31 local function rawpairs(t)