diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-11-26 19:55:48 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-03-24 13:26:37 +0100 |
commit | c34a20e1f60486140f0ddc5657c077d2fdc9c7f5 (patch) | |
tree | b56fec65a0d3bd9eeae5055eb55e5b570636364e /src/libexpr/attr-set.cc | |
parent | ddc6aaa8b242ab23fb23c7e78a460fcae61fade7 (diff) |
EvalState::allocAttr(): Add convenience method
(cherry picked from commit c02da997570ac0d9b595d787bea8cb5a4e3cc1f5)
Diffstat (limited to 'src/libexpr/attr-set.cc')
-rw-r--r-- | src/libexpr/attr-set.cc | 6 |
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()); |