cgo

package module
v0.0.0-...-18ae873 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CGO_ErrorMessage

func CGO_ErrorMessage(errHandle Handle) *C.char

CGO_ErrorMessage returns the error message as a string

func ValueOf

func ValueOf(h Handle) interface{}

Types

type BlobT

type BlobT struct {
	HandleT
	// contains filtered or unexported fields
}

func NewBlob

func NewBlob(b []byte) *BlobT

func (*BlobT) CBytes

func (bp *BlobT) CBytes() unsafe.Pointer

type ErrorT

type ErrorT struct {
	HandleT
	// contains filtered or unexported fields
}

Error interface{}

func (*ErrorT) CError

func (ep *ErrorT) CError() *C.char

CError returns the error message as a string

type Handle

type Handle = C.cGoHandle
Handle interface {
	Value() interface{}
}

Handle uintptr

func CGO_Close

func CGO_Close(handle Handle) (errHandle Handle)

CGO_Close recycles the resources bound to the handle

func NewErrorHandle

func NewErrorHandle(err error) Handle

func NewErrorHandleWithCode

func NewErrorHandleWithCode(err error, code int) (errH Handle)

func NewHandle

func NewHandle(v interface{}) Handle

type HandleT

type HandleT struct {
	// contains filtered or unexported fields
}
Recycler interface {
	Recycle()
}

func (*HandleT) CBytes

func (h *HandleT) CBytes(b []byte) unsafe.Pointer

func (*HandleT) CString

func (h *HandleT) CString(s string) *C.char

func (*HandleT) Close

func (h *HandleT) Close() error

type StringT

type StringT struct {
	HandleT
	// contains filtered or unexported fields
}

func NewString

func NewString(s string) *StringT

func (*StringT) CString

func (sp *StringT) CString() *C.char

Jump to

Keyboard shortcuts

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