Re: [Chicken-users] pass by value and callbacks

2014-03-12 Thread r
Hello pluijzer As i know chicken didnt have pass-by-value FFI type. This is little bit verbose workaround. Note that you should use foreign-safe-lambda for callbacks from C. (import scheme chicken foreign) # typedef struct { int x, y; } Point; typedef void (*SomeCallbackFuncType)(Point

[Chicken-users] pass by value and callbacks

2014-03-08 Thread pluijzer .
Hello chickeners, I am trying to wrap a function that accepts a function pointer with an argument to a struct passed by value. I don't know how to do this (and fear it is not possible) but maybe somebody else has a solution. A little example of what I mean: # typedef struct { int x, y; }