about summary refs log tree commit diff
path: root/src/libexpr/common-opts.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-13T12·25+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-13T12·25+0000
commitac1e8f40d4a5c380d68bb6f1c7cef6f1e7987c1a (patch)
treebcdb22f27c39948cdb254afd560ac198ae675f56 /src/libexpr/common-opts.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/common-opts.cc')
-rw-r--r--src/libexpr/common-opts.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/common-opts.cc b/src/libexpr/common-opts.cc
index 6171de0f0e84..a25317de1346 100644
--- a/src/libexpr/common-opts.cc
+++ b/src/libexpr/common-opts.cc
@@ -20,10 +20,10 @@ bool parseOptionArg(const string & arg, Strings::iterator & i,
     if (i == argsEnd) throw error;
     string value = *i++;
 
-    Value & v(autoArgs[name]);
+    Value & v(autoArgs[state.symbols.create(name)]);
 
     if (arg == "--arg")
-        state.mkThunk_(v, parseExprFromString(value, absPath(".")));
+        state.mkThunk_( v, parseExprFromString(state, value, absPath(".")));
     else
         mkString(v, value);