aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-set.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-11-26 19:55:48 +0100
committerEelco Dolstra <edolstra@gmail.com>2019-02-11 11:55:29 +0100
commitc02da997570ac0d9b595d787bea8cb5a4e3cc1f5 (patch)
tree0f38aef43de1865adeb4b9da8b951a2397f0bcf5 /src/libexpr/attr-set.cc
parentf70434b1fbbdb0e188718f0c55a8156a7aa08744 (diff)
EvalState::allocAttr(): Add convenience method
Diffstat (limited to 'src/libexpr/attr-set.cc')
-rw-r--r--src/libexpr/attr-set.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libexpr/attr-set.cc b/src/libexpr/attr-set.cc
index 0785897d2..b1d61a285 100644
--- a/src/libexpr/attr-set.cc
+++ b/src/libexpr/attr-set.cc
@@ -43,6 +43,12 @@ Value * EvalState::allocAttr(Value & vAttrs, const Symbol & name)
}
+Value * EvalState::allocAttr(Value & vAttrs, const std::string & name)
+{
+ return allocAttr(vAttrs, symbols.create(name));
+}
+
+
void Bindings::sort()
{
std::sort(begin(), end());