about summary refs log tree commit diff
path: root/src/libexpr/parser.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-05-04T12·21+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-05-04T12·21+0000
commit0832956089516d32371060c98df4f8d0cbff2b0f (patch)
treeff054ab5727324f0de5bdc56460aeafded11f5f5 /src/libexpr/parser.cc
parent9840368cad6088e4221fb323202861c97d70bb37 (diff)
* Use the new ATermMap.
Diffstat (limited to 'src/libexpr/parser.cc')
-rw-r--r--src/libexpr/parser.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/parser.cc b/src/libexpr/parser.cc
index 2ca1cab4afcb..241a437345fc 100644
--- a/src/libexpr/parser.cc
+++ b/src/libexpr/parser.cc
@@ -115,7 +115,7 @@ static void checkAttrSets(ATerm e)
     ATermList formals;
     ATerm body, pos;
     if (matchFunction(e, formals, body, pos)) {
-        ATermMap names;
+        ATermMap names(ATgetLength(formals));
         for (ATermIterator i(formals); i; ++i) {
             ATerm name;
             Expr deflt;
@@ -131,13 +131,13 @@ static void checkAttrSets(ATerm e)
 
     ATermList bnds;
     if (matchAttrs(e, bnds)) {
-        ATermMap names;
+        ATermMap names(ATgetLength(bnds));
         checkAttrs(names, bnds);
     }
     
     ATermList rbnds, nrbnds;
     if (matchRec(e, rbnds, nrbnds)) {
-        ATermMap names;
+        ATermMap names(ATgetLength(rbnds) + ATgetLength(nrbnds));
         checkAttrs(names, rbnds);
         checkAttrs(names, nrbnds);
     }