EvalState::allocAttr(): Add convenience method

(cherry picked from commit c02da99757)
This commit is contained in:
Eelco Dolstra 2018-11-26 19:55:48 +01:00
parent ddc6aaa8b2
commit c34a20e1f6
2 changed files with 7 additions and 0 deletions

View file

@ -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());

View file

@ -272,6 +272,7 @@ public:
Env & allocEnv(size_t size);
Value * allocAttr(Value & vAttrs, const Symbol & name);
Value * allocAttr(Value & vAttrs, const std::string & name);
Bindings * allocBindings(size_t capacity);