GIRepository.field_info_set_field

Writes a field identified by a GFieldInfo to a C structure or union. This only handles fields of simple C types. It will fail for a field of a composite type like a nested structure or union even if that is actually writable. Note also that that it will refuse to write fields where memory management would by required. A field with a type such as 'char *' must be set with a setter function.