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:
parent
cdee317419
commit
5eaf644c99
3 changed files with 80 additions and 26 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue