Skip to content
Snippets Groups Projects
Commit 4a71f1bd authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Now creates code that uses ADD_FUNCTION2().

Rev: bin/precompile.pike:1.15
parent 9c28efd1
No related branches found
No related tags found
No related merge requests found
......@@ -472,10 +472,10 @@ array convert(array x, string base)
});
if (attributes->efun) {
addfuncs+=({
sprintf("\n#ifdef f_%s_defined\n",name),
PC.Token(sprintf(" %s(%O,f_%s,tFunc(%s,%s),%s);\n",
attributes->efun ? "ADD_EFUN" : "ADD_FUNCTION",
PC.Token(sprintf(" ADD_EFUN(%O, f_%s, tFunc(%s, %s), %s);\n",
attributes->name || name,
name,
attributes->type ? attributes->type :
......@@ -486,7 +486,22 @@ array convert(array x, string base)
),proto[0]->line),
sprintf("#endif\n",name),
});
} else {
addfuncs+=({
sprintf("\n#ifdef f_%s_defined\n",name),
PC.Token(sprintf(" ADD_FUNCTION2(%O, f_%s, tFunc(%s, %s), %s, %s);\n",
attributes->name || name,
name,
attributes->type ? attributes->type :
Array.map(args->type,convert_type)*" ",
convert_type(rettype),
attributes->flags || "0" ,
attributes->optflags ||
"OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT"
),proto[0]->line),
sprintf("#endif\n",name),
});
}
int argnum;
argnum=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment