From e9762e2d10c4a837e3d75d53e3a24452f07f47ec Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 19 Jan 2005 11:04:24 +0000 Subject: [PATCH] * Support arities > 6. --- src/aterm-helper.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/aterm-helper.pl b/src/aterm-helper.pl index 5067b0a9b..5666244ae 100755 --- a/src/aterm-helper.pl +++ b/src/aterm-helper.pl @@ -100,7 +100,13 @@ while () { 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";