about summary refs log tree commit diff
path: root/src/libutil/aterm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/aterm.cc')
-rw-r--r--src/libutil/aterm.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/aterm.cc b/src/libutil/aterm.cc
index bb6e33ce92c0..90a8e212ef4d 100644
--- a/src/libutil/aterm.cc
+++ b/src/libutil/aterm.cc
@@ -41,3 +41,13 @@ ATerm nix::toATerm(const string & s)
 {
     return toATerm(s.c_str());
 }
+
+
+ATermList nix::toATermList(const StringSet & ss)
+{
+    ATermList l = ATempty;
+    for (StringSet::const_reverse_iterator i = ss.rbegin();
+         i != ss.rend(); ++i)
+        l = ATinsert(l, toATerm(*i));
+    return l;
+}