Documentation ¶
Overview ¶
ffi provides an easy way to call into C code using the libffi Foreign Function Interface library
Index ¶
Constants ¶
View Source
const ( TrampolineSize = C.FFI_TRAMPOLINE_SIZE NativeRawApi = C.FFI_NATIVE_RAW_API )
Variables ¶
View Source
var ( Void = Type{&C.ffi_type_void} Uchar = Type{&C.ffi_type_uchar} Char = Type{&C.ffi_type_schar} Ushort = Type{&C.ffi_type_ushort} Short = Type{&C.ffi_type_sshort} Uint = Type{&C.ffi_type_uint} Int = Type{&C.ffi_type_sint} Ulong = Type{&C.ffi_type_ulong} Long = Type{&C.ffi_type_slong} Uint8 = Type{&C.ffi_type_uint8} Int8 = Type{&C.ffi_type_sint8} Uint16 = Type{&C.ffi_type_uint16} Int16 = Type{&C.ffi_type_sint16} Uint32 = Type{&C.ffi_type_uint32} Int32 = Type{&C.ffi_type_sint32} Uint64 = Type{&C.ffi_type_uint64} Int64 = Type{&C.ffi_type_sint64} Float = Type{&C.ffi_type_float} Double = Type{&C.ffi_type_double} LongDouble = Type{&C.ffi_type_longdouble} Pointer = Type{&C.ffi_type_pointer} )
Functions ¶
This section is empty.
Types ¶
type Abi ¶
Abi is the ffi abi of the local plateform
const ( FirstAbi Abi = C.FFI_FIRST_ABI DefaultAbi Abi = C.FFI_DEFAULT_ABI LastAbi Abi = C.FFI_LAST_ABI )
type Cif ¶
type Cif struct {
// contains filtered or unexported fields
}
Cif is the ffi call interface
type Closure ¶
type Closure struct {
// contains filtered or unexported fields
}
Closure models a ffi closure
type Library ¶
type Library struct {
// contains filtered or unexported fields
}
Library is a dl-opened library holding the corresponding dl.Handle
func NewLibrary ¶
Click to show internal directories.
Click to hide internal directories.