Documentation ¶
Index ¶
- Constants
- type CFunction
- type Integer
- type KContext
- type KFunction
- type Number
- type State
- func (L *State) Absindex(idx c.Int) c.Int
- func (L *State) Call(nargs c.Int, nresults c.Int) c.Int
- func (L *State) Callk(nargs c.Int, nresults c.Int, ctx KContext, k KFunction) 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) Getmetatable(objindex c.Int) 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) Iscfunction(idx c.Int) c.Int
- 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) Pushcclosure(fn CFunction, n c.Int)
- func (L *State) Pushcfunction(f CFunction)
- 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) Setmetatable(objindex c.Int) c.Int
- 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) Tocfunction(idx c.Int) CFunction
- 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)
- func (L *State) Yield(nresults c.Int) c.Int
- func (L *State) Yieldk(nresults c.Int, ctx KContext, k KFunction) c.Int
- type Unsigned
Constants ¶
const ( OK = 0 YIELD = 1 ERRRUN = 2 ERRSYNTAX = 3 ERRMEM = 4 ERRERR = 5 )
/* thread status */
const ( NONE c.Int = -1 NIL c.Int = 0 BOOLEAN c.Int = 1 LIGHTUSERDATA c.Int = 2 NUMBER c.Int = 3 STRING c.Int = 4 TABLE c.Int = 5 FUNCTION c.Int = 6 USERDATA c.Int = 7 THREAD c.Int = 8 UMTYPES c.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 ¶ added in v0.9.2
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 ¶ added in v0.9.2
llgo:link (*State).Createtable C.lua_createtable
func (*State) Getmetatable ¶ added in v0.9.4
llgo:link (*State).Getmetatable C.lua_getmetatable
func (*State) Iscfunction ¶ added in v0.9.4
llgo:link (*State).Iscfunction C.lua_iscfunction
func (*State) Isyieldable ¶ added in v0.9.2
llgo:link (*State).Isyieldable C.lua_isyieldable
func (*State) Loadstring ¶ added in v0.9.2
llgo:link (*State).Loadstring C.luaL_loadstring
func (*State) Openlibs ¶ added in v0.9.2
func (L *State) Openlibs()
llgo:link (*State).Openlibs C.luaL_openlibs
func (*State) Pushboolean ¶ added in v0.9.2
llgo:link (*State).Pushboolean C.lua_pushboolean
func (*State) Pushcclosure ¶ added in v0.9.4
llgo:link (*State).Pushcclosure C.lua_pushcclosure
func (*State) Pushcfunction ¶ added in v0.9.4
#define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))
func (*State) Pushfstring ¶ added in v0.9.2
llgo:link (*State).Pushfstring C.lua_pushfstring
func (*State) Pushinteger ¶ added in v0.9.2
llgo:link (*State).Pushinteger C.lua_pushinteger
func (*State) Pushlstring ¶ added in v0.9.2
llgo:link (*State).Pushlstring C.lua_pushlstring
func (*State) Pushnil ¶ added in v0.9.2
func (L *State) Pushnil()
/* ** push functions (C -> stack) */ llgo:link (*State).Pushnil C.lua_pushnil
func (*State) Pushnumber ¶ added in v0.9.2
llgo:link (*State).Pushnumber C.lua_pushnumber
func (*State) Pushstring ¶ added in v0.9.2
llgo:link (*State).Pushstring C.lua_pushstring
func (*State) Setmetatable ¶ added in v0.9.4
llgo:link (*State).Setmetatable C.lua_setmetatable
func (*State) Tocfunction ¶ added in v0.9.4
llgo:link (*State).Tocfunction C.lua_tocfunction
func (*State) Tointegerx ¶ added in v0.9.2
llgo:link (*State).Tointegerx C.lua_tointegerx