metaffi

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const GO_RUNTIME_ID = 3958232544

Variables

This section is empty.

Functions

func ConstructCDT

func ConstructCDT(item *CDT, currentIndex []uint64, ctxt *ConstructContext, knownType *IDL.MetaFFITypeInfo) error

func FromCDTToGo

func FromCDTToGo(pvcdt unsafe.Pointer, i int, objectType reflect.Type) interface{}

func FromGoToCDT

func FromGoToCDT(input interface{}, pvcdt unsafe.Pointer, t IDL.MetaFFITypeInfo, i int)

func GetCacheSize

func GetCacheSize() int

func GetGoObject

func GetGoObject(h *C.struct_cdt_metaffi_handle) interface{}

func GetMetaFFITypeInfo

func GetMetaFFITypeInfo(input interface{}) (IDL.MetaFFITypeInfo, reflect.Type)

func GetObject

func GetObject(h Handle) interface{}

func GetReleaserCFunction added in v0.2.0

func GetReleaserCFunction() unsafe.Pointer

func GoObjectToMetaffiHandle

func GoObjectToMetaffiHandle(p *C.struct_cdt_metaffi_handle, val interface{})

func ReleaseObject

func ReleaseObject(h Handle) error

func Releaser added in v0.2.0

func Releaser(h C.metaffi_handle)

func TraverseCDT

func TraverseCDT(item *CDT, currentIndex []uint64, ctxt *TraverseContext) error

func TraverseCDTS

func TraverseCDTS(arr *CDTS, startingIndex []uint64, ctxt *TraverseContext) error

func XLLRAllocCDTSBuffer

func XLLRAllocCDTSBuffer(paramsCount uint64, retsCount uint64) (pcdts unsafe.Pointer, parametersCDTS unsafe.Pointer, return_valuesCDTS unsafe.Pointer)

func XLLRFreeCDTSBuffer added in v0.2.0

func XLLRFreeCDTSBuffer(pcdts unsafe.Pointer)

func XLLRFreeRuntimePlugin

func XLLRFreeRuntimePlugin(runtimePlugin string) error

func XLLRFreeXCall added in v0.2.0

func XLLRFreeXCall(runtimePlugin string, xcall unsafe.Pointer) error

func XLLRLoadEntity added in v0.2.0

func XLLRLoadEntity(runtimePlugin string, modulePath string, entityPath string, paramsTypes []uint64, retvalsTypes []uint64) (unsafe.Pointer, error)

func XLLRLoadEntityWithAliases added in v0.2.0

func XLLRLoadEntityWithAliases(runtimePlugin string, modulePath string, entityPath string, paramsTypes []IDL.MetaFFITypeInfo, retvalsTypes []IDL.MetaFFITypeInfo) (unsafe.Pointer, error)

func XLLRLoadRuntimePlugin

func XLLRLoadRuntimePlugin(runtimePlugin string) error

func XLLRXCallNoParamsNoRet

func XLLRXCallNoParamsNoRet(xcall unsafe.Pointer) error

func XLLRXCallNoParamsRet

func XLLRXCallNoParamsRet(xcall unsafe.Pointer, cdts unsafe.Pointer) error

func XLLRXCallParamsNoRet

func XLLRXCallParamsNoRet(xcall unsafe.Pointer, cdts unsafe.Pointer) error

func XLLRXCallParamsRet

func XLLRXCallParamsRet(xcall unsafe.Pointer, pcdts unsafe.Pointer) error

Types

type CDT

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

func (*CDT) GetArray added in v0.3.0

func (cdt *CDT) GetArray() *CDTS

func (*CDT) GetBool

func (cdt *CDT) GetBool() bool

func (*CDT) GetBoolVal

func (cdt *CDT) GetBoolVal() C.metaffi_bool

func (*CDT) GetCallableVal

func (cdt *CDT) GetCallableVal() *MetaFFICallable

func (*CDT) GetChar16

func (cdt *CDT) GetChar16() rune

func (*CDT) GetChar32

func (cdt *CDT) GetChar32() rune

func (*CDT) GetChar8

func (cdt *CDT) GetChar8() rune

func (*CDT) GetFloat32

func (cdt *CDT) GetFloat32() float32

func (*CDT) GetFloat32Val

func (cdt *CDT) GetFloat32Val() C.metaffi_float32

func (*CDT) GetFloat64

func (cdt *CDT) GetFloat64() float64

func (*CDT) GetFloat64Val

func (cdt *CDT) GetFloat64Val() C.metaffi_float64

func (*CDT) GetFreeRequired added in v0.2.0

func (cdt *CDT) GetFreeRequired() C.metaffi_bool

func (*CDT) GetHandleRuntime added in v0.3.0

func (cdt *CDT) GetHandleRuntime() uint64

func (*CDT) GetHandleStruct added in v0.3.0

func (cdt *CDT) GetHandleStruct() *C.struct_cdt_metaffi_handle

func (*CDT) GetHandleVal

func (cdt *CDT) GetHandleVal() uintptr

func (*CDT) GetInt16 added in v0.3.0

func (cdt *CDT) GetInt16() int16

func (*CDT) GetInt16Val

func (cdt *CDT) GetInt16Val() C.metaffi_int16

func (*CDT) GetInt32

func (cdt *CDT) GetInt32() int32

func (*CDT) GetInt32Val

func (cdt *CDT) GetInt32Val() C.metaffi_int32

func (*CDT) GetInt64

func (cdt *CDT) GetInt64() int64

func (*CDT) GetInt64Val

func (cdt *CDT) GetInt64Val() C.metaffi_int64

func (*CDT) GetInt8

func (cdt *CDT) GetInt8() int8

func (*CDT) GetInt8Val

func (cdt *CDT) GetInt8Val() C.metaffi_int8

func (*CDT) GetString16 added in v0.3.0

func (cdt *CDT) GetString16() string

func (*CDT) GetString32 added in v0.3.0

func (cdt *CDT) GetString32() string

func (*CDT) GetString8

func (cdt *CDT) GetString8() string

func (*CDT) GetTypeVal

func (cdt *CDT) GetTypeVal() C.metaffi_type

func (*CDT) GetUInt16

func (cdt *CDT) GetUInt16() uint16

func (*CDT) GetUInt16Val

func (cdt *CDT) GetUInt16Val() C.metaffi_uint16

func (*CDT) GetUInt32

func (cdt *CDT) GetUInt32() uint32

func (*CDT) GetUInt32Val

func (cdt *CDT) GetUInt32Val() C.metaffi_uint32

func (*CDT) GetUInt64

func (cdt *CDT) GetUInt64() uint64

func (*CDT) GetUInt64Val

func (cdt *CDT) GetUInt64Val() C.metaffi_uint64

func (*CDT) GetUInt8 added in v0.3.0

func (cdt *CDT) GetUInt8() uint8

func (*CDT) GetUInt8Val

func (cdt *CDT) GetUInt8Val() C.metaffi_uint8

func (*CDT) SetArray added in v0.3.0

func (cdt *CDT) SetArray(val *CDTS)

func (*CDT) SetBool

func (cdt *CDT) SetBool(val bool)

func (*CDT) SetBoolVal

func (cdt *CDT) SetBoolVal(val C.metaffi_bool)

func (*CDT) SetCallableVal

func (cdt *CDT) SetCallableVal(val *MetaFFICallable)

func (*CDT) SetChar16

func (cdt *CDT) SetChar16(r rune)

func (*CDT) SetChar32

func (cdt *CDT) SetChar32(r rune)

func (*CDT) SetChar8

func (cdt *CDT) SetChar8(r rune)

func (*CDT) SetFloat32

func (cdt *CDT) SetFloat32(val float32)

func (*CDT) SetFloat32Val

func (cdt *CDT) SetFloat32Val(val C.metaffi_float32)

func (*CDT) SetFloat64

func (cdt *CDT) SetFloat64(val float64)

func (*CDT) SetFloat64Val

func (cdt *CDT) SetFloat64Val(val C.metaffi_float64)

func (*CDT) SetFreeRequired added in v0.3.0

func (cdt *CDT) SetFreeRequired(val bool)

func (*CDT) SetHandleStruct added in v0.3.0

func (cdt *CDT) SetHandleStruct(val *CDTMetaFFIHandle)

func (*CDT) SetInt16 added in v0.3.0

func (cdt *CDT) SetInt16(val int16)

func (*CDT) SetInt16Val

func (cdt *CDT) SetInt16Val(val C.metaffi_int16)

func (*CDT) SetInt32

func (cdt *CDT) SetInt32(val int32)

func (*CDT) SetInt32Val

func (cdt *CDT) SetInt32Val(val C.metaffi_int32)

func (*CDT) SetInt64

func (cdt *CDT) SetInt64(val int64)

func (*CDT) SetInt64Val

func (cdt *CDT) SetInt64Val(val C.metaffi_int64)

func (*CDT) SetInt8

func (cdt *CDT) SetInt8(val int8)

func (*CDT) SetInt8Val

func (cdt *CDT) SetInt8Val(val C.metaffi_int8)

func (*CDT) SetString16 added in v0.3.0

func (cdt *CDT) SetString16(val string)

func (*CDT) SetString32 added in v0.3.0

func (cdt *CDT) SetString32(val string)

func (*CDT) SetString8

func (cdt *CDT) SetString8(val string)

func (*CDT) SetTypeVal

func (cdt *CDT) SetTypeVal(t C.metaffi_type)

func (*CDT) SetUInt16

func (cdt *CDT) SetUInt16(val uint16)

func (*CDT) SetUInt16Val

func (cdt *CDT) SetUInt16Val(val C.metaffi_uint16)

func (*CDT) SetUInt32

func (cdt *CDT) SetUInt32(val uint32)

func (*CDT) SetUInt32Val

func (cdt *CDT) SetUInt32Val(val C.metaffi_uint32)

func (*CDT) SetUInt64

func (cdt *CDT) SetUInt64(val uint64)

func (*CDT) SetUInt64Val

func (cdt *CDT) SetUInt64Val(val C.metaffi_uint64)

func (*CDT) SetUInt8 added in v0.3.0

func (cdt *CDT) SetUInt8(val uint8)

func (*CDT) SetUInt8Val

func (cdt *CDT) SetUInt8Val(val C.metaffi_uint8)

type CDTMetaFFIHandle

type CDTMetaFFIHandle struct {
	Val *C.struct_cdt_metaffi_handle
}

func NewCDTMetaFFIHandle added in v0.3.0

func NewCDTMetaFFIHandle(handle Handle, runtimeID uint64, releaserFunc unsafe.Pointer) *CDTMetaFFIHandle

func (*CDTMetaFFIHandle) GetHandle

func (handle *CDTMetaFFIHandle) GetHandle() C.metaffi_handle

type CDTS

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

func NewCDTS added in v0.3.0

func NewCDTS(c *C.struct_cdts) *CDTS

func NewCDTSFromCDTS

func NewCDTSFromCDTS(c *C.struct_cdt, length uint64, fixedDimensions int64) *CDTS

func NewCDTSFromSize added in v0.3.0

func NewCDTSFromSize(arrayLength uint64, fixedDimensions int64) *CDTS

func (*CDTS) GetCDT

func (cdts *CDTS) GetCDT(index int) *CDT

func (*CDTS) GetFixedDimensions

func (cdts *CDTS) GetFixedDimensions() C.metaffi_int64

func (*CDTS) GetLength

func (cdts *CDTS) GetLength() C.metaffi_size

func (*CDTS) SetFixedDimensions added in v0.3.0

func (cdts *CDTS) SetFixedDimensions(val C.metaffi_int64)

func (*CDTS) SetLength added in v0.3.0

func (cdts *CDTS) SetLength(val C.metaffi_size)

type ConstructContext added in v0.3.0

type ConstructContext struct {
	Input    interface{}
	TypeInfo IDL.MetaFFITypeInfo
	Cdt      CDT
}

type Handle

type Handle C.metaffi_handle

func SetObject

func SetObject(obj interface{}) Handle

sets the object and returns a handle if object already set, it returns the existing handle

type MetaFFICallable

type MetaFFICallable struct {
	Val *C.struct_cdt_metaffi_callable
}

type MetaFFIChar16

type MetaFFIChar16 struct {
	Val *C.struct_metaffi_char16
}

type MetaFFIChar32

type MetaFFIChar32 struct {
	Val *C.struct_metaffi_char32
}

type MetaFFIChar8

type MetaFFIChar8 struct {
	Val *C.struct_metaffi_char8
}

type MetaFFIHandle

type MetaFFIHandle struct {
	Val       Handle
	RuntimeID uint64
	Releaser  func() error
	CReleaser unsafe.Pointer
}

type TraverseContext added in v0.3.0

type TraverseContext struct {
	ObjectType  reflect.Type
	ObjectValue reflect.Value
	Result      interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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