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 ¶ 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) Isinteger ¶ added in v0.9.2
/* ** access functions (stack -> C) */ LUA_API int (lua_isinteger) (State *L, int idx); llgo:link (*State).Isinteger C.lua_isinteger
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) Pcallk ¶ added in v0.9.2
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 ¶ added in v0.9.2
llgo:link (*State).Pushboolean C.lua_pushboolean
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) Setglobal ¶ added in v0.9.2
TODO(zzy):add to demo llgo:link (*State).Setglobal C.lua_setglobal
func (*State) Tointegerx ¶ added in v0.9.2
llgo:link (*State).Tointegerx C.lua_tointegerx