It seems like a waste to collect the arguments from the stack into an array, and then copy them back onto the stack.
I'll probably write that code in pike, then.
/ Niels Möller ()
Previous text:
2003-03-13 13:35: Subject: .cmod
The following ought to work, but it seems precompile.pike doesn't support varargs yet.
PIKECLASS foo { PIKEVAR program f;
// Note: args is a reserved variable name. PIKEFUN mixed `()(int ... arguments) { if (!THIS->f) Pike_error("...\n"); push_array_items(arguments); ref_push_program(f); f_call_function(arguments->size); stack_pop_n_elems_keep_top(args); } }
/ Henrik Grubbström (Lysator)