1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

* A simple API for parsing NAR archives.

This commit is contained in:
Eelco Dolstra 2008-12-03 17:30:32 +00:00
parent cdee317419
commit 5eaf644c99
3 changed files with 80 additions and 26 deletions

View file

@ -80,9 +80,9 @@ struct StringSink : Sink
/* A source that reads data from a string. */
struct StringSource : Source
{
string & s;
const string & s;
unsigned int pos;
StringSource(string & _s) : s(_s), pos(0) { }
StringSource(const string & _s) : s(_s), pos(0) { }
virtual void operator () (unsigned char * data, unsigned int len)
{
s.copy((char *) data, len, pos);