Method

GIRepositoryUnionInfoget_discriminator_offset

since: 2.80

Declaration

gboolean
gi_union_info_get_discriminator_offset (
  GIUnionInfo* info,
  size_t* out_offset
)

Description

Obtain the offset of the discriminator field within the structure.

The union must be discriminated, or FALSE will be returned.

Available since: 2.80

Parameters

out_offset

Type: size_t*

Return location for the offset, in bytes, of the discriminator.

The argument will be set by the function.
The argument can be NULL.

Return value

Type: gboolean

TRUE if the union is discriminated.