about summary refs log tree commit diff
path: root/src/libutil/aterm.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-11-03T18·12+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-11-03T18·12+0000
commitcb7ccb528bbaeb30d09fbb41e57ab75d3121e1bc (patch)
treed27270a2b3c6abc86f56956d906899374778f028 /src/libutil/aterm.cc
parent4cbd845aa491b5cf534f8c031d285fc454933868 (diff)
* string2ATerm -> overloaded toATerm.
Diffstat (limited to 'src/libutil/aterm.cc')
-rw-r--r--src/libutil/aterm.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libutil/aterm.cc b/src/libutil/aterm.cc
index 77bf8dab4c12..6ca4521909ea 100644
--- a/src/libutil/aterm.cc
+++ b/src/libutil/aterm.cc
@@ -27,3 +27,15 @@ Error badTerm(const format & f, ATerm t)
     }
     return Error(format("%1%, in `%2%'") % f.str() % (string) s);
 }
+
+
+ATerm toATerm(const char * s)
+{
+    return (ATerm) ATmakeAppl0(ATmakeAFun((char *) s, 0, ATtrue));
+}
+
+
+ATerm toATerm(const string & s)
+{
+    return toATerm(s.c_str());
+}