[plt-scheme] ffi circular dependency
Hi,
I'm tring to wrap a C structure and a function pointer which have
circular dependency:
struct cpBody;
typedef void (*cpBodyVelocityFunc)(struct cpBody *body);
typedef struct cpBody{
cpBodyVelocityFunc velocity_func;
}
I'm not sure how to solve this. Is forward declaration possible somehow?
(define _cpbody-velocity-func
(_fun (body : _cpbody-pointer)
-> _void))
(define-cstruct _cpbody (
[velocity-func _cpbody-velocity-func]))
Any help would be appreciated.
Gabor