forked from lix-project/hydra
Update for receiveContents taking string_view
nix change: https://github.com/NixOS/nix/commit/faa31f40
This commit is contained in:
parent
bde8d81876
commit
34a856c7ab
|
@ -45,15 +45,15 @@ struct Extractor : ParseSink
|
|||
hashSink = std::make_unique<HashSink>(htSHA256);
|
||||
}
|
||||
|
||||
void receiveContents(unsigned char * data, size_t len) override
|
||||
void receiveContents(std::string_view data) override
|
||||
{
|
||||
assert(expectedSize);
|
||||
assert(curMember);
|
||||
assert(hashSink);
|
||||
*curMember->fileSize += len;
|
||||
(*hashSink)(data, len);
|
||||
*curMember->fileSize += data.size();
|
||||
(*hashSink)(data);
|
||||
if (curMember->contents) {
|
||||
curMember->contents->append((char *) data, len);
|
||||
curMember->contents->append(data);
|
||||
}
|
||||
assert(curMember->fileSize <= expectedSize);
|
||||
if (curMember->fileSize == expectedSize) {
|
||||
|
|
Loading…
Reference in a new issue