From d308aeaf53b7324af98dfa949a747526c241ef30 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 19 Aug 2013 12:35:03 +0200 Subject: Store Nix integers as longs So on 64-bit systems, integers are now 64-bit. Fixes #158. --- src/libutil/util.hh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libutil/util.hh') diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 6c83987c5d46..86c65b763d00 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -319,7 +319,12 @@ template bool string2Int(const string & s, N & n) return str && str.get() == EOF; } -string int2String(int n); +template string int2String(N n) +{ + std::ostringstream str; + str << n; + return str.str(); +} /* Return true iff `s' ends in `suffix'. */ -- cgit 1.4.1