unsigned long long -> uint64_t

This commit is contained in:
Eelco Dolstra 2020-08-04 11:34:05 +02:00
parent 7d3ba616a9
commit 4b5813051b
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 6 additions and 7 deletions

View file

@ -32,7 +32,7 @@ struct BuildOutput
std::string releaseName;
unsigned long long closureSize = 0, size = 0;
uint64_t closureSize = 0, size = 0;
std::list<BuildProduct> products;

View file

@ -23,8 +23,7 @@ using namespace nix;
namespace nix {
template<> void toJSON<std::atomic<long>>(std::ostream & str, const std::atomic<long> & n) { str << n; }
template<> void toJSON<std::atomic<unsigned long>>(std::ostream & str, const std::atomic<unsigned long> & n) { str << n; }
template<> void toJSON<std::atomic<unsigned long long>>(std::ostream & str, const std::atomic<unsigned long long> & n) { str << n; }
template<> void toJSON<std::atomic<uint64_t>>(std::ostream & str, const std::atomic<uint64_t> & n) { str << n; }
template<> void toJSON<double>(std::ostream & str, const double & n) { str << n; }
}

View file

@ -36,7 +36,7 @@ struct Extractor : ParseSink
}).first->second;
}
std::optional<unsigned long long> expectedSize;
std::optional<uint64_t> expectedSize;
std::unique_ptr<HashSink> hashSink;
void preallocateContents(uint64_t size) override

View file

@ -8,7 +8,7 @@
struct NarMemberData
{
nix::FSAccessor::Type type;
std::optional<unsigned long long> fileSize;
std::optional<uint64_t> fileSize;
std::optional<std::string> contents;
std::optional<nix::Hash> sha256;
};

View file

@ -631,8 +631,8 @@ BuildOutput State::getBuildOutputCached(Connection & conn, nix::ref<nix::Store>
BuildOutput res;
res.failed = r[0][1].as<int>() == bsFailedWithOutput;
res.releaseName = r[0][2].is_null() ? "" : r[0][2].as<std::string>();
res.closureSize = r[0][3].is_null() ? 0 : r[0][3].as<unsigned long long>();
res.size = r[0][4].is_null() ? 0 : r[0][4].as<unsigned long long>();
res.closureSize = r[0][3].is_null() ? 0 : r[0][3].as<uint64_t>();
res.size = r[0][4].is_null() ? 0 : r[0][4].as<uint64_t>();
auto products = txn.exec_params
("select type, subtype, fileSize, sha256hash, path, name, defaultPath from BuildProducts where build = $1 order by productnr",