diff options
Diffstat (limited to 'src/aterm-helper.pl')
-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"; |