about summary refs log tree commit diff
path: root/src/aterm-helper.pl
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-19T11·04+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-19T11·04+0000
commite9762e2d10c4a837e3d75d53e3a24452f07f47ec (patch)
tree66997ee749ce372c1f1e4bc1a84b75de209ac5b6 /src/aterm-helper.pl
parent6d493751c331e7b695f82e9c259423efa7741f59 (diff)
* Support arities > 6.
Diffstat (limited to 'src/aterm-helper.pl')
-rwxr-xr-xsrc/aterm-helper.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/aterm-helper.pl b/src/aterm-helper.pl
index 5067b0a9be8d..5666244ae2b6 100755
--- a/src/aterm-helper.pl
+++ b/src/aterm-helper.pl
@@ -100,7 +100,13 @@ while (<STDIN>) {
         print IMPL "AFun sym$funname = 0;\n";
         
         print HEADER "static inline $result make$funname($formals) {\n";
-        print HEADER "    return (ATerm) ATmakeAppl$arity(sym$funname$args);\n";
+        if ($arity <= 6) {
+            print HEADER "    return (ATerm) ATmakeAppl$arity(sym$funname$args);\n";
+        } else {
+            $args =~ s/^,//;
+            print HEADER "    ATerm array[$arity] = {$args};\n";
+            print HEADER "    return (ATerm) ATmakeApplArray(sym$funname, array);\n";
+        }
         print HEADER "}\n\n";
 
         print HEADER "#ifdef __cplusplus\n";