In a c-lambda, what are the types of the argument variables ___arg1, ___arg2, and so on? It seems like they are statically resolved to the types I passed in to the c-lambda, and everything happens that I expect to happen:
(define %%addOne (c-lambda (int) int "___result=___arg1+1;"))
(display (%%addOne 10))
This correctly prints out 11, and other various operations on pointers seemed to work too. For example, if 'ctx' is a structure with a 'id' field, and 'ctxp' is defined as (pointer ctx), the following function works fine:
(define %%useCtx (c-lambda (ctxp) int "___result=(*___arg1).id;"))
Basically, my question is when do I need to use ___CAST on the argument variables? Is it something I should be doing most of the time for safety, to suppress warnings or for some other reason? Or is it something done in a special case I haven't encountered yet? I've seen it done in other gambit FFI's and I'm wondering if the other was just paranoid or something (and if I should be).