about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-01-13T14·21+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-01-13T14·21+0000
commit11158028be348ed9eb58bf78f4cc9711e8bfe664 (patch)
treed9c0419661749c4d9afd47f9400ebb542bffe444 /src/libexpr/eval.cc
parent1b7840b949f038d44f31492bd59e0e189e17ef9c (diff)
* Cleanup.
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index e58ff695c59c..8665edcfab41 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -37,7 +37,7 @@ static Expr substArgs(EvalState & state,
     ATermMap subs(nrFormals);
 
     /* Get the actual arguments and put them in the substitution. */
-    ATermMap args(128); /* !!! fix */
+    ATermMap args;
     queryAllAttrs(arg, args);
     for (ATermMap::const_iterator i = args.begin(); i != args.end(); ++i)
         subs.set(i->key, i->value);
@@ -151,7 +151,7 @@ static Expr updateAttrs(Expr e1, Expr e2)
 {
     /* Note: e1 and e2 should be in normal form. */
 
-    ATermMap attrs(128); /* !!! */
+    ATermMap attrs;
     queryAllAttrs(e1, attrs, true);
     queryAllAttrs(e2, attrs, true);
 
@@ -343,7 +343,7 @@ Expr autoCallFunction(Expr e, const ATermMap & args)
     ATerm body, pos;
     
     if (matchFunction(e, formals, body, pos)) {
-        ATermMap actualArgs(128);
+        ATermMap actualArgs(ATgetLength(formals));
         
         for (ATermIterator i(formals); i; ++i) {
             Expr name, def, value; ATerm values, def2;
@@ -496,7 +496,7 @@ Expr evalExpr2(EvalState & state, Expr e)
 
     /* Withs. */
     if (matchWith(e, e1, e2, pos)) {
-        ATermMap attrs(128); /* !!! */
+        ATermMap attrs;        
         try {
             e1 = evalExpr(state, e1);
             queryAllAttrs(e1, attrs);
@@ -550,7 +550,7 @@ Expr evalExpr2(EvalState & state, Expr e)
 
     /* Attribute existence test (?). */
     if (matchOpHasAttr(e, e1, name)) {
-        ATermMap attrs(128); /* !!! */
+        ATermMap attrs;
         queryAllAttrs(evalExpr(state, e1), attrs);
         return makeBool(attrs.get(name) != 0);
     }
@@ -576,7 +576,7 @@ Expr evalExpr2(EvalState & state, Expr e)
             if (matchAttrs(e1, as) && matchPath(e2, p)) {
                 static bool haveWarned = false;
                 warnOnce(haveWarned, format(
-                    "concatenation of a derivation and a path is deprecated, "
+                    "concatenation of a derivation and a path is deprecated; "
                     "you should write `drv + \"%1%\"' instead of `drv + %1%'")
                     % aterm2String(p));
                 PathSet context;