lua

package
v0.0.0-...-17c0c07 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalMutex *sync.Mutex = &sync.Mutex{}

GlobalMutex provides a mutex across the entire package.

Functions

This section is empty.

Types

type Function

type Function func(State) int

type Metatable

type Metatable struct {
	IndexFunc    Function
	NewindexFunc Function
	TostringFunc Function
	GCFunc       Function
}

func (*Metatable) GC

func (this *Metatable) GC() Function

func (*Metatable) Index

func (this *Metatable) Index() Function

func (*Metatable) Newindex

func (this *Metatable) Newindex() Function

func (*Metatable) Tostring

func (this *Metatable) Tostring() Function

type Registry

type Registry struct {
	// contains filtered or unexported fields
}
var GlobalRegistry *Registry = NewRegistry()

GlobalRegistry holds golang values in which their registry indexes are to be passed to the C runtime. upon return from the C runtime, we can use the Registry Indexes sent back from C to obtain our real values. NEVER EVER SEND GOLANG POINTERS TO C. golang may change pointer values during scheduling and GC, so references to go pointers in C may age-out

func NewRegistry

func NewRegistry() *Registry

func (*Registry) AddValue

func (this *Registry) AddValue(govalue interface{}) int

func (*Registry) GetValue

func (this *Registry) GetValue(INDEX int) (interface{}, error)

func (*Registry) RemoveValue

func (this *Registry) RemoveValue(INDEX int) error

func (*Registry) ReserveValue

func (this *Registry) ReserveValue() int

func (*Registry) SetValue

func (this *Registry) SetValue(index int, value interface{})

type State

type State interface {
	Dostring(string) int
	Error()
	Getfield(int, string)
	Getglobal(string)
	Gettop() int
	Insert(int)
	Isnil(int) bool
	Isnumber(int) bool
	Loadfile(string) error
	Newtable()
	Newthread() State
	Openlibs()
	Pcall(int, int, int) error
	Pop(int)
	Pushclosure(Function, int)
	Pushfunction(Function)
	Pushmetatable(*Metatable)
	Pushmodule(string, Function)
	Pushnumber(float64)
	Pushstring(string)
	Resume(int) (bool, error)
	Setfield(int, string)
	Setglobal(string)
	Setmetatable(int) int
	Tonumber(int) float64
	Tostring(int) string
	Xmove(State, int)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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