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

Store Nix integers as longs

So on 64-bit systems, integers are now 64-bit.

Fixes #158.
This commit is contained in:
Eelco Dolstra 2013-08-19 12:35:03 +02:00
parent 297b762513
commit d308aeaf53
9 changed files with 25 additions and 23 deletions

View file

@ -31,14 +31,17 @@ struct PrimOp;
struct Symbol;
typedef long NixInt;
struct Value
{
ValueType type;
union
union
{
int integer;
NixInt integer;
bool boolean;
/* Strings in the evaluator carry a so-called `context' which
is a list of strings representing store paths. This is to
allow users to write things like
@ -63,7 +66,7 @@ struct Value
const char * s;
const char * * context; // must be in sorted order
} string;
const char * path;
Bindings * attrs;
struct {
@ -97,7 +100,7 @@ static inline void clearValue(Value & v)
}
static inline void mkInt(Value & v, int n)
static inline void mkInt(Value & v, NixInt n)
{
clearValue(v);
v.type = tInt;