g_field_info_get_size always returns zero
Documentation suggest that this function returns size of field member in the units of bits. On the other hand, implementation suggest that it is supposed to return bitfield width. As far as I can see the bitfield width is not saved in typelib, so this ends up being zero.
Example demonstrating the issue:
#!/usr/bin/env python3 from collections import Counter import gi namespaces = [ ('GLib', '2.0'), ('GObject', '2.0'), ('Gio', '2.0'), ('Gdk', '3.0'), ('Gtk', '3.0'), ] counter = Counter() repository = gi.Repository.get_default() for name, version in namespaces: repository.require(name, version) for info in repository.get_infos(name): get_fields = getattr(info, 'get_fields', None) if get_fields is None: continue for field in get_fields(): counter[field.get_size()] += 1 print(counter)