FFI Interface

G-Golf FFI Interface low level API.
girffi — TODO.

Procedures

gi-type-tag-get-ffi-type
g-type-info-get-ffi-type
gi-type-info-extract-ffi-return-value
gi-type-tag-extract-ffi-return-value
g-callable-info-prepare-closure

Description

TODO.

Procedures

Procedure: gi-type-tag-get-ffi-type type-tag is-pointer?

Returns a (pointer to) ffi-type corresponding to the platform default C ABI for type-tag and is-pointer?.

The info argument is (must be) a valid %gi-type-tag, otherwise an exception is raised.

The is-pointer? argument, #t or #f, to indicate whether or not this is a pointer type.

Procedure: g-type-info-get-ffi-type info

Returns an (pointer to) ffi-type corresponding to the platform default C ABI for info.

The info argument is [must be] a pointer to a GITypeInfo.

Procedure: gi-type-info-extract-ffi-return-value type-info ffi-value gi-argument

Returns nothing.

Extract the correct bits from ffi-value into gi-argument.

The type-info is the GITypeInfo of ffi-value. The ffi-value is a pointer to a GIFFIReturnValue union containing the value from the ffi_call(). The gi-argument is a pointer to an allocated GIArgument.

Procedure: gi-type-tag-extract-ffi-return-value return-tag interface-type ffi-value gi-argument

Returns nothing.

Extract the correct bits from ffi-value into gi-argument.

The return-tag is the %gi-type-tag of ffi-value. The interface-type is the %gi-info-type of the underlying interface. The ffi-value is a pointer to a GIFFIReturnValue union containing the value from the ffi_call(). The gi-argument is a pointer to an allocated GIArgument.

The interface-type argument only applies if return-tag is 'interface, otherwise it is ignored.

Procedure: g-callable-info-prepare-closure info ffi-cif ffi-closure-callback user-data

Returns the native address of the closure or #f on error.

The procedure has been deprecated since version 1.72 and should
not be used in newly-written code. Use
g-callable-info-create-closure instead.

The return value should be freed by calling g-callable-info-free-closure.