Method

GIRepositoryFieldInfoset_field

since: 2.80

Declaration

gboolean
gi_field_info_set_field (
  GIFieldInfo* field_info,
  void* mem,
  const GIArgument* value
)

Description

Writes a field identified by a GIFieldInfo 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.

Available since: 2.80

This method is not directly available to language bindings.

Parameters

mem

Type: void*

Pointer to a block of memory representing a C structure or union.

The argument can be NULL.
The data is owned by the caller of the function.
value

Type: GIArgument

A GIArgument holding the value to store.

The data is owned by the caller of the function.

Return value

Type: gboolean

TRUE if writing the field succeeded, FALSE otherwise.