mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
* Support arities > 6.
This commit is contained in:
parent
6d493751c3
commit
e9762e2d10
1 changed files with 7 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue