* Support arities > 6.

This commit is contained in:
Eelco Dolstra 2005-01-19 11:04:24 +00:00
parent 6d493751c3
commit e9762e2d10

View file

@ -100,7 +100,13 @@ while (<STDIN>) {
print IMPL "AFun sym$funname = 0;\n";
print HEADER "static inline $result make$funname($formals) {\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";