forked from lix-project/lix
Use int64_t and NixFloat in fromTOML types
This makes sure that values parsed from TOML have a proper size. Using e.g. `double` caused issues on i686 where the size of `double` (32bit) was too small to accommodate some values.
This commit is contained in:
parent
6ca2db2dad
commit
b16643b6fc
|
@ -47,10 +47,10 @@ static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Va
|
||||||
mkBool(v, toml::get<bool>(t));
|
mkBool(v, toml::get<bool>(t));
|
||||||
break;;
|
break;;
|
||||||
case toml::value_t::integer:
|
case toml::value_t::integer:
|
||||||
mkInt(v, toml::get<long>(t));
|
mkInt(v, toml::get<int64_t>(t));
|
||||||
break;;
|
break;;
|
||||||
case toml::value_t::floating:
|
case toml::value_t::floating:
|
||||||
mkFloat(v, toml::get<double>(t));
|
mkFloat(v, toml::get<NixFloat>(t));
|
||||||
break;;
|
break;;
|
||||||
case toml::value_t::string:
|
case toml::value_t::string:
|
||||||
mkString(v, toml::get<std::string>(t));
|
mkString(v, toml::get<std::string>(t));
|
||||||
|
|
Loading…
Reference in a new issue