Cyclone Scheme
0.28.0
|
◆ load_varargs
Value:
{ \
int i; \
object tmp; \
if ((count) > 0) { \
for (i = 0; i < (count); i++) { \
tmp = args_var[start + i]; \
var[i].hdr.mark = gc_color_red; \
var[i].hdr.grayed = 0; \
var[i].hdr.immutable = 0; \
var[i].tag = pair_tag; \
var[i].pair_car = tmp; \
var[i].pair_cdr = (i == ((count)-1)) ? NULL : &var[i + 1]; \
} \
} \
}
Variable argument count support This macro is intended to be executed at the top of a function that is passed 'var' as a variable-length argument. 'count' is the number of varargs that were passed. EG:
Argument count would need to be passed by the caller of f. Presumably our compiler will compute the difference between the number of required args and the number of provided ones, and pass the difference as 'count' |