ffi

package
v0.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call added in v0.17.0

func Call(cif *CIF, fn unsafe.Pointer, rvalue unsafe.Pointer, avalues []unsafe.Pointer)

func IsStruct added in v0.17.0

func IsStruct(t *Type) bool

func PrepCIF added in v0.17.0

func PrepCIF(rtype *Type, argtypes []*Type) (*CIF, Status)

Types

type ABI added in v0.17.0

type ABI = C.ffi_abi
var DEFAULT_ABI ABI = C.FFI_DEFAULT_ABI

type Arg added in v0.17.0

type Arg = C.ffi_arg

type CIF added in v0.17.0

type CIF = C.ffi_cif

type Closure added in v0.17.0

type Closure C.ffi_closure

type ClosureHandle added in v0.17.0

type ClosureHandle func(cif *CIF, ret unsafe.Pointer, args []unsafe.Pointer)

type Status added in v0.17.0

type Status = C.ffi_status
var BAD_ABI Status = C.FFI_BAD_ABI
var BAD_ARGTYPE Status = C.FFI_BAD_ARGTYPE
var BAD_TYPEDEF Status = C.FFI_BAD_TYPEDEF
var OK Status = C.FFI_OK

func CreateClosure added in v0.17.0

func CreateClosure(cif *CIF, f ClosureHandle) (codeloc unsafe.Pointer, udHandle cgo.Handle, status Status)

type Type added in v0.17.0

type Type = C.ffi_type
var TypeDouble *Type = &C.ffi_type_double
var TypeFloat *Type = &C.ffi_type_float
var TypePointer *Type = &C.ffi_type_pointer
var TypeSint16 *Type = &C.ffi_type_sint16
var TypeSint32 *Type = &C.ffi_type_sint32
var TypeSint64 *Type = &C.ffi_type_sint64
var TypeSint8 *Type = &C.ffi_type_sint8
var TypeUint16 *Type = &C.ffi_type_uint16
var TypeUint32 *Type = &C.ffi_type_uint32
var TypeUint64 *Type = &C.ffi_type_uint64
var TypeUint8 *Type = &C.ffi_type_uint8
var TypeVoid *Type = &C.ffi_type_void

func MakeStructType added in v0.17.2

func MakeStructType(types []*Type) *Type

type UserData added in v0.17.0

type UserData struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL