[plt-scheme] define-cstruct, mutual dependency
Hi,
I'm trying to work with two C structs that use each other in their
definitions. I don't see a way to define this with `define-cstruct'.
struct Object {
Class *isa;
}
struct Class : Object {
const char *name;
...
}
This doesn't work, because I can't mention one before the other:
(define-cstruct _Object ([isa _Class-pointer]))
(define-cstruct (_Class _Object) ([name _string] ...)
I'd like to declare the inheritance relation so I can pass classes to
functions that expect objects.
Any ideas?
thanks,
Rob