Re: does gobject-introspection support C structs with bit fields?



On Thu, Jul 21, 2016 at 8:03 PM, Giuseppe Scrivano <gscrivano gnu org> wrote:
Are C structs with bit fields supported?  We can't replace the bit
fields at this point, as it would be a breaking change for us.  Any
suggestions?

Doesn't look like it; at least not completely. The gir contains field
sizes but libgirepository returns 0 with g_field_info_get_size(). And
g_field_info_set_field() which is used in pygobject only looks at the
type and offset.

I'd say best file a bug with gobject-introspection.

Maybe create a new flags type and a setter function which applies them
to the bitfields as a workaround?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]