Hi all,
I'm new to Vala, so please bear with me if I draw the wrong conclusions
here...
poppler/glib/poppler-page.h defines the following struct:
struct _PopplerLinkMapping
{
PopplerRectangle area;
PopplerAction *action;
};
In my Vala code I do something like this (simplified):
unowned GLib.List<unowned LinkMapping> mappings =
page.get_link_mapping();
foreach (var m in mappings) {
double y1 = m.area.y1;
}
The generated C code assumes that area is a pointer which obviously
won't work:
double y1;
y1_rel = m->area->y1;
Marking PopplerRectangle as is_value_type in
vapi/packages/poppler-glib/poppler-glib.metadata (see attached patch)
and re-generating the .vapi file fixes the problem for me. I haven't
found any documentation on the exact effects of is_value_type="1" so I'm
not sure whether this might break other code.
Comments welcome.
Cheers,
Rene
Attachment:
0001-poppler-glib-mark-PopplerRectangle-as-is_value_type.patch
Description: application/mbox