ffi

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT, BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

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

func IsStruct

func IsStruct(t *Type) bool

func PrepCIF

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

Types

type ABI

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

type Arg

type Arg = C.ffi_arg

type CIF

type CIF = C.ffi_cif

type Closure

type Closure C.ffi_closure

type ClosureHandle

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

type Status

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

func CreateClosure

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

type Type

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

func MakeStructType(types []*Type) *Type

type UserData

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