diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-01-19T11·04+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-01-19T11·04+0000 |
commit | e9762e2d10c4a837e3d75d53e3a24452f07f47ec (patch) | |
tree | 66997ee749ce372c1f1e4bc1a84b75de209ac5b6 /src | |
parent | 6d493751c331e7b695f82e9c259423efa7741f59 (diff) |
* Support arities > 6.
Diffstat (limited to 'src')
-rwxr-xr-x | src/aterm-helper.pl | 8 |
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"; |