1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Merge pull request #762 from ctheune/ctheune-floats

Implement floats
This commit is contained in:
Eelco Dolstra 2016-02-12 12:49:59 +01:00
commit b3e8d72770
27 changed files with 231 additions and 37 deletions

View file

@ -1127,6 +1127,10 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs)
attrs2["type"] = "int";
attrs2["value"] = (format("%1%") % v->integer).str();
xml.writeEmptyElement("meta", attrs2);
} else if (v->type == tFloat) {
attrs2["type"] = "float";
attrs2["value"] = (format("%1%") % v->fpoint).str();
xml.writeEmptyElement("meta", attrs2);
} else if (v->type == tBool) {
attrs2["type"] = "bool";
attrs2["value"] = v->boolean ? "true" : "false";