aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-path.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-13 12:25:42 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-13 12:25:42 +0000
commitac1e8f40d4a5c380d68bb6f1c7cef6f1e7987c1a (patch)
treebcdb22f27c39948cdb254afd560ac198ae675f56 /src/libexpr/attr-path.cc
parent10e8b1fd15d59dc541c15f6da56f8baf58eb3aa3 (diff)
* Use a symbol table to represent identifiers and attribute names
efficiently. The symbol table ensures that there is only one copy of each symbol, thus allowing symbols to be compared efficiently using a pointer equality test.
Diffstat (limited to 'src/libexpr/attr-path.cc')
-rw-r--r--src/libexpr/attr-path.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc
index aa421ab43..b53837781 100644
--- a/src/libexpr/attr-path.cc
+++ b/src/libexpr/attr-path.cc
@@ -45,7 +45,7 @@ void findAlongAttrPath(EvalState & state, const string & attrPath,
format("the expression selected by the selection path `%1%' should be an attribute set but is %2%")
% curPath % showType(v));
- Bindings::iterator a = v.attrs->find(attr);
+ Bindings::iterator a = v.attrs->find(state.symbols.create(attr));
if (a == v.attrs->end())
throw Error(format("attribute `%1%' in selection path `%2%' not found") % attr % curPath);
v = a->second;