1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-26 12:10:59 +01:00

added state options and state locations into drv

This commit is contained in:
Wouter den Breejen 2007-05-16 10:16:10 +00:00
parent b712f0f019
commit 4c63f18dcc
7 changed files with 120 additions and 14 deletions

View file

@ -51,3 +51,15 @@ ATermList nix::toATermList(const StringSet & ss)
l = ATinsert(l, toATerm(*i));
return l;
}
ATermList nix::toATermList(const SetStringSet & sss)
{
ATermList l = ATempty;
for (SetStringSet::const_reverse_iterator i = sss.rbegin(); i != sss.rend(); ++i){
StringSet ss = *i;
for (StringSet::const_reverse_iterator j = ss.rbegin(); j != ss.rend(); ++j){
l = ATinsert(l, toATerm(*j));
}
}
return l;
}

View file

@ -44,6 +44,7 @@ ATerm toATerm(const char * s);
ATerm toATerm(const string & s);
ATermList toATermList(const StringSet & ss);
ATermList toATermList(const SetStringSet & sss);
}

View file

@ -48,6 +48,7 @@ public:
typedef list<string> Strings;
typedef set<string> StringSet;
typedef set<StringSet> SetStringSet;
/* Paths are just strings. */