Documentation
¶
Index ¶
- Constants
- type Integer
- type KContext
- type KFunction
- type Number
- type State
- func (L *State) AbsIndex(idx c.Int) c.Int
- func (L *State) CheckStack(n c.Int) c.Int
- func (L *State) Close()
- func (L *State) Copy(fromidx c.Int, toidx c.Int)
- func (L *State) CreateTable(narr c.Int, nrec c.Int)
- func (L *State) DoFile(filename *c.Char) c.Int
- func (L *State) DoString(str *c.Char) c.Int
- func (L *State) GetField(idx c.Int, k *c.Char) c.Int
- func (L *State) GetGlobal(name *c.Char) c.Int
- func (L *State) GetTable(idx c.Int) c.Int
- func (L *State) GetTop() c.Int
- func (L *State) IsBoolean(n c.Int) bool
- func (L *State) IsFunction(n c.Int) bool
- func (L *State) IsInteger(idx c.Int) c.Int
- func (L *State) IsLightUserData(n c.Int) bool
- func (L *State) IsNil(n c.Int) bool
- func (L *State) IsNone(n c.Int) bool
- func (L *State) IsNoneOrNil(n c.Int) bool
- func (L *State) IsNumber(idx c.Int) c.Int
- func (L *State) IsString(idx c.Int) c.Int
- func (L *State) IsTable(n c.Int) bool
- func (L *State) IsThread(n c.Int) bool
- func (L *State) IsYieldable() c.Int
- func (L *State) LoadFile(filename *c.Char) c.Int
- func (L *State) LoadFilex(filename *c.Char, mode *c.Char) c.Int
- func (L *State) LoadString(s *c.Char) c.Int
- func (L *State) NewTable()
- func (L *State) NewThread() *State
- func (L *State) Next(idx c.Int) c.Int
- func (L *State) OpenLibs()
- func (L *State) PCall(nargs c.Int, nresults c.Int, errfunc c.Int) c.Int
- func (L *State) PCallk(nargs c.Int, nresults c.Int, errfunc c.Int, ctx KContext, k *KFunction) c.Int
- func (L *State) Pop(n c.Int)
- func (L *State) PushBoolean(b c.Int)
- func (L *State) PushFString(format *c.Char, __llgo_va_list ...any) *c.Char
- func (L *State) PushInteger(n Integer)
- func (L *State) PushLString(s *c.Char, len c.Ulong) *c.Char
- func (L *State) PushNil()
- func (L *State) PushNumber(n Number)
- func (L *State) PushString(s *c.Char) *c.Char
- func (L *State) PushValue(idx c.Int)
- func (L *State) Resume(from *State, narg c.Int, nres *c.Int) c.Int
- func (L *State) Rotate(idx c.Int, n c.Int)
- func (L *State) SetField(idx c.Int, k *c.Char)
- func (L *State) SetGlobal(name *c.Char)
- func (L *State) SetTable(idx c.Int)
- func (L *State) SetTop(idx c.Int)
- func (L *State) Status() c.Int
- func (L *State) ToBoolean(idx c.Int) bool
- func (L *State) ToInteger(idx c.Int) Integer
- func (L *State) ToIntegerx(idx c.Int, isnum *c.Int) Integer
- func (L *State) ToLString(idx c.Int, len *c.Ulong) *c.Char
- func (L *State) ToNumber(idx c.Int) Number
- func (L *State) ToNumberx(idx c.Int, isnum *c.Int) Number
- func (L *State) ToString(idx c.Int) *c.Char
- func (L *State) Type(idx c.Int) c.Int
- func (L *State) TypeName(tp c.Int) *c.Char
- func (L *State) XMove(to *State, n c.Int)
- type Unsigned
Constants ¶
const ( OK = 0 YIELD = 1 ERRRUN = 2 ERRSYNTAX = 3 ERRMEM = 4 ERRERR = 5 )
/* thread status */
const ( NONE = int(-1) NIL = int(0) BOOLEAN = int(1) LIGHTUSERDATA = int(2) NUMBER = int(3) STRING = int(4) TABLE = int(5) FUNCTION = int(6) USERDATA = int(7) THREAD = int(8) UMTYPES = int(9) )
/* ** basic types */
const ( RIDX_MAINTHREAD = 1 RIDX_GLOBALS = 2 RIDX_LAST = RIDX_GLOBALS )
/* predefined values in the registry */
const ( GCSTOP = 0 GCRESTART = 1 GCCOLLECT = 2 GCCOUNT = 3 GCCOUNTB = 4 GCSTEP = 5 GCSETPAUSE = 6 GCSETSTEPMUL = 7 GCISRUNNING = 9 GCGEN = 10 GCINC = 11 )
const ( HOOKCALL = 0 HOOKRET = 1 HOOKLINE = 2 HOOKCOUNT = 3 HOOKTAILCALL = 4 )
const ( MASKCALL = 1 << HOOKCOUNT MASKRET = 1 << HOOKRET MASKLINE = 1 << HOOKLINE MASKCOUNT = 1 << HOOKCOUNT )
const (
LLGoPackage = "link: $(pkg-config --libs lua); -llua -lm"
)
const (
MINSTACK = 20
)
/* minimum Lua stack available to a C function */
const (
MULTRET = -1
)
/* option for multiple returns in 'lua_pcall' and 'lua_call' */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
type State struct {
Unused [8]byte
}
func (*State) CheckStack ¶
llgo:link (*State).CheckStack C.lua_checkstack
func (*State) Close ¶
func (L *State) Close()
/* ** state manipulation */ llgo:link (*State).Close C.lua_close
func (*State) CreateTable ¶
llgo:link (*State).CreateTable C.lua_createtable
func (*State) IsInteger ¶
/* ** access functions (stack -> C) */ LUA_API int (lua_isinteger) (State *L, int idx); llgo:link (*State).IsInteger C.lua_isinteger
func (*State) IsYieldable ¶
llgo:link (*State).IsYieldable C.lua_isyieldable
func (*State) LoadString ¶
llgo:link (*State).LoadString C.luaL_loadstring
func (*State) PCallk ¶
func (L *State) PCallk(nargs c.Int, nresults c.Int, errfunc c.Int, ctx KContext, k *KFunction) c.Int
llgo:link (*State).PCallk C.lua_pcallk
func (*State) PushBoolean ¶
llgo:link (*State).PushBoolean C.lua_pushboolean
func (*State) PushFString ¶
llgo:link (*State).PushFString C.lua_pushfstring
func (*State) PushInteger ¶
llgo:link (*State).PushInteger C.lua_pushinteger
func (*State) PushLString ¶
llgo:link (*State).PushLString C.lua_pushlstring
func (*State) PushNil ¶
func (L *State) PushNil()
/* ** push functions (C -> stack) */ llgo:link (*State).PushNil C.lua_pushnil
func (*State) PushNumber ¶
llgo:link (*State).PushNumber C.lua_pushnumber
func (*State) PushString ¶
llgo:link (*State).PushString C.lua_pushstring
func (*State) ToIntegerx ¶
llgo:link (*State).ToIntegerx C.lua_tointegerx
Directories
¶
| Path | Synopsis |
|---|---|
|
_demo
|
|
|
coroutine
command
|
|
|
error
command
|
|
|
funccall-concat
command
|
|
|
funccall-number
command
|
|
|
funccall-string
command
|
|
|
hello
command
|
|
|
loadcall
command
|
|
|
stack
command
|
|
|
table
command
|