[C2hs] Questions
Paolo Martini
p.martini at neuralnoise.com
Sun Aug 7 04:58:19 EDT 2005
Hello,
First of all, thanks much for the good tool you're providing :-)
I have some questions.
Why doesn't {#enum ..#} hooks define the default marshallers to be
cFromEnum/cToEnum? Furthermore, is it possible to define the
marshallers functions for a give type? (IMO it would make the .chs files
more readable) If not, would it be possible to extend the syntax, maybe
adding "... inmarsh outmarsh#}" at the end of the hooks?
For example I'm using "id" as the marshaller for {#pointer ..#} hooks,
(in {#fun name {id `pointer'} -> `pointer' id#}) is it correct, or am I
missing something?
I can't find an example of a C struct type which isn't defined as a
pointer. How should one go to bind structures like this?
typedef struct {
unsigned long index;
double x;
double y;
} cairo_glyph_t;
And then, how to pass them to functions getting a *cairo_glyph_t?
Moreover, what if they are getting an array of them? (e.g.
void cairo_show_glyphs (cairo_t *cr,
cairo_glyph_t *glyphs,
int num_glyphs);
Thank you,
Paolo.
--
More information about the C2hs
mailing list