G-Golf class, accessors, methods and procedures to deal with C union types.
G-Golf class, accessors, methods and procedures to deal with C union types.
The <gi-union>
class. Its class-direct-slots
are:
g-type
#:accessor !g-type
#:init-keyword #:g-typeg-name
#:accessor !g-name
#:init-keyword #:g-namename
#:accessor !name
size
#:accessor !size
#:init-keyword #:sizealignment
#:accessor !alignment
#:init-keyword #:alignmentfields
#:accessor !fields
#:init-keyword #:fieldsis-discrimanted?
#:accessor !is-discriminated?
#:init-keyword #:is-discriminated?discriminator-offset
#:accessor !discriminator-offset
#:init-keyword #:discriminator-offsetdiscriminator
#:accessor !discriminator #:init-keyword #:discriminator #:init-value #f
The name
slot is automatically initialized.
Instances of the <gi-union>
are immutable (to be precise, there
are not meant to be mutated, see GOOPS Notes and Conventions,
’Slots are not Immutable’).
Returns a pointer.
Create a foreign pointer to a C union for the list of types (see Foreign Types in the Guile Reference Manual for a list of supported types).
Returns the content of the C union pointed by foreign, for the given size and type.
Returns nothing.
Sets the content of the C union pointed by foreign to val, given its size and type.
Returns the content of their respective slot for inst.