On 9/17/05, Thomas Chust <[EMAIL PROTECTED]> wrote: > Hello, > > I just found the following prototype in chicken.h: > > C_fctexport void C_apply(C_word c, C_word closure, C_word k, C_word fn, > ...) C_noret; > > I wondered why on earth there was a closure parameter and a fn parameter. > Reading the sourcecode of runtime.c carefully reveiled that the closure > parameter is apparently not used at all, so what is the reason for its > existence?
The standard calling convention is: argument-count, closure, continuation, arguments... so, the closure is the actual closure object that contains the code-pointer and the free variables. Primitives have no free variables, so it is not used. cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
