ffi

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackDispatcher

type CallbackDispatcher[CallbackContext any] interface {
	// DispatchCallback dispatches a call from foreign function.
	//
	// targetPC is the pc provided when registering the target function.
	// ctx is the foreign function specific callback context.
	DispatchCallback(targetPC uintptr, ctx *CallbackContext)
}

CallbackDispatcher defines the generic interface to dispatch ffi callbacks.

The CallbackContext is specific to each foreign language.

type DispatchFunc

type DispatchFunc[T any, CallbackContext any] func(
	recv T, targetPC uintptr, ctx *CallbackContext,
)

DispatchFunc is the function signature of CallbackDispatcher.DispatchCallback

Directories

Path Synopsis
js
Package js provides ffi support for JavaScript.
Package js provides ffi support for JavaScript.

Jump to

Keyboard shortcuts

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