Documentation ¶
Index ¶
- Constants
- func Upvalueindex(i c.Int) c.Int
- type Alloc
- type CFunction
- type CallInfo
- type Debug
- type Hook
- type Integer
- type KContext
- type KFunction
- type Number
- type Reader
- type State
- func (L *State) Absindex(idx c.Int) c.Int
- func (L *State) Atpanic(panicf CFunction) CFunction
- 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) Checkinteger(arg c.Int) Integer
- func (L *State) Checknumber(arg c.Int) Number
- func (L *State) Checkstack(n c.Int) c.Int
- func (L *State) Close()
- func (L *State) Closeslot(idx c.Int)
- func (L *State) Closethread(from *State) c.Int
- func (L *State) Concat(n c.Int)
- 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) Dump(writer Writer, data c.Pointer, strip c.Int) c.Int
- func (L *State) Error() c.Int
- func (L *State) Gc(what c.Int, __llgo_va_list ...any) c.Int
- func (L *State) Getallocf(ud *c.Pointer) Alloc
- func (L *State) Getextraspace() c.Pointer
- func (L *State) Getfield(idx c.Int, k *c.Char) c.Int
- func (L *State) Getglobal(name *c.Char) c.Int
- func (L *State) Gethook() Hook
- func (L *State) Gethookcount() c.Int
- func (L *State) Gethookmask() c.Int
- func (L *State) Geti(idx c.Int, n Integer) c.Int
- func (L *State) Getinfo(what *c.Char, ar *Debug) c.Int
- func (L *State) Getiuservalue(idx c.Int, n c.Int) c.Int
- func (L *State) Getlocal(ar *Debug, n c.Int) *c.Char
- func (L *State) Getmetatable(objindex c.Int) c.Int
- func (L *State) Getstack(level c.Int, ar *Debug) c.Int
- func (L *State) Gettable(idx c.Int) c.Int
- func (L *State) Gettop() c.Int
- func (L *State) Getupvalue(funcindex c.Int, n c.Int) *c.Char
- func (L *State) Getuservalue(idx c.Int) c.Int
- func (L *State) Insert(idx 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) Isuserdata(idx c.Int) c.Int
- func (L *State) Isyieldable() c.Int
- func (L *State) LError(format *c.Char, __llgo_va_list ...any) c.Int
- func (L *State) Len(idx c.Int)
- func (L *State) Load(reader Reader, dt c.Pointer, chunkname *c.Char, mode *c.Char) 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) Newuserdata(sz uintptr) c.Pointer
- func (L *State) Newuserdatauv(sz uintptr, nuvalue c.Int) c.Pointer
- 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) Pushglobaltable() c.Int
- func (L *State) Pushinteger(n Integer)
- func (L *State) Pushlightuserdata(p c.Pointer)
- func (L *State) Pushliteral(s *c.Char) *c.Char
- 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) Pushthread() c.Int
- func (L *State) Pushvalue(idx c.Int)
- func (L *State) Rawget(idx c.Int) c.Int
- func (L *State) Rawgeti(idx c.Int, n Integer) c.Int
- func (L *State) Rawgetp(idx c.Int, p c.Pointer) c.Int
- func (L *State) Rawset(idx c.Int)
- func (L *State) Rawseti(idx c.Int, n Integer)
- func (L *State) Rawsetp(idx c.Int, p c.Pointer)
- func (L *State) Register(name *c.Char, f CFunction)
- func (L *State) Remove(idx c.Int)
- func (L *State) Replace(idx c.Int)
- func (L *State) Resetthread(from *State) 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) Setallocf(f Alloc, ud c.Pointer) Alloc
- func (L *State) Setcstacklimit(limit c.Uint) c.Int
- func (L *State) Setfield(idx c.Int, k *c.Char)
- func (L *State) Setglobal(name *c.Char)
- func (L *State) Sethook(fn Hook, mask c.Int, count c.Int)
- func (L *State) Seti(idx c.Int, n Integer)
- func (L *State) Setiuservalue(idx c.Int, n c.Int) c.Int
- func (L *State) Setlocal(ar *Debug, n c.Int) *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) Setupvalue(funcindex c.Int, n c.Int) *c.Char
- func (L *State) Setuservalue(idx c.Int) c.Int
- func (L *State) Setwarnf(f WarnFunction, ud c.Pointer)
- func (L *State) Status() c.Int
- func (L *State) Stringtonumber(s *c.Char) c.Ulong
- func (L *State) Toboolean(idx c.Int) bool
- func (L *State) Tocfunction(idx c.Int) CFunction
- func (L *State) Toclose(idx c.Int)
- 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) Topointer(idx c.Int) c.Pointer
- func (L *State) Tostring(idx c.Int) *c.Char
- func (L *State) Tothread(idx c.Int) *State
- func (L *State) Touserdata(idx c.Int) c.Pointer
- func (L *State) Type(idx c.Int) c.Int
- func (L *State) Typename(tp c.Int) *c.Char
- func (L *State) Upvalueid(fidx c.Int, n c.Int) c.Pointer
- func (L *State) Upvaluejoin(fidx1 c.Int, n1 c.Int, fidx2 c.Int, n2 c.Int)
- func (L *State) Version() Number
- func (L *State) Warning(msg *c.Char, tocont c.Int)
- 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
- type WarnFunction
- type Writer
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 NUMTYPES 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 (
EXTRASPACE = unsafe.Sizeof(uintptr(0))
)
@@ LUA_EXTRASPACE defines the size of a raw memory area associated with ** a Lua state with very fast access. ** CHANGE it if you need a different size.
const (
IDSIZE = 60
)
@@ LUA_IDSIZE gives the maximum size for the description of the source ** of a function in debug information. ** CHANGE it if you want a different size.
const (
LLGoPackage = "link: $(pkg-config --libs lua); -llua -lm"
)
const (
MAXSTACK = 1000000
)
const (
MINSTACK = 20
)
minimum Lua stack available to a C function
const (
MULTRET = -1
)
option for multiple returns in 'lua_pcall' and 'lua_call'
const (
NUMTAGS = NUMTYPES
)
const (
REGISTRYINDEX = -MAXSTACK - 1000
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Debug ¶ added in v0.9.8
type Debug struct { Event c.Int Name *c.Char /* (n) */ Namewhat *c.Char /* (n) 'global', 'local', 'field', 'method' */ What *c.Char /* (S) 'Lua', 'C', 'main', 'tail' */ Source *c.Char /* (S) */ Srclen uintptr /* (S) */ Currentline c.Int /* (l) */ Linedefined c.Int /* (S) */ Lastlinedefined c.Int /* (S) */ Nups byte /* (u) number of upvalues */ Nparams byte /* (u) number of parameters */ Isvararg c.Char /* (u) */ Istailcall c.Char /* (t) */ Ftransfer uint16 /* (r) index of first value transferred */ Ntransfer uint16 /* (r) number of transferred values */ ShortSrc [IDSIZE]c.Char /* (S) */ /* private part */ ICi *CallInfo }
type State ¶
type State struct {
Unused [8]byte
}
func Newstate__0 ¶ added in v0.9.8
llgo:link Newstate__0 C.lua_newstate
func Newstate__1 ¶ added in v0.9.8
func Newstate__1() *State
func (*State) Checkinteger ¶ added in v0.9.7
llgo:link (*State).Checkinteger C.luaL_checkinteger
func (*State) Checknumber ¶ added in v0.9.7
llgo:link (*State).Checknumber C.luaL_checknumber
func (*State) Checkstack ¶ added in v0.9.2
llgo:link (*State).Checkstack C.lua_checkstack
func (*State) Closethread ¶ added in v0.9.8
llgo:link (*State).Closethread C.lua_closethread
func (*State) Createtable ¶ added in v0.9.2
llgo:link (*State).Createtable C.lua_createtable
func (*State) Getextraspace ¶ added in v0.9.8
func (*State) Gethookcount ¶ added in v0.9.8
llgo:link (*State).Gethookcount C.lua_gethookcount
func (*State) Gethookmask ¶ added in v0.9.8
llgo:link (*State).Gethookmask C.lua_gethookmask
func (*State) Getiuservalue ¶ added in v0.9.8
llgo:link (*State).Getiuservalue C.lua_getiuservalue
func (*State) Getmetatable ¶ added in v0.9.4
llgo:link (*State).Getmetatable C.lua_getmetatable
func (*State) Getupvalue ¶ added in v0.9.8
llgo:link (*State).Getupvalue C.lua_getupvalue
func (*State) Iscfunction ¶ added in v0.9.4
llgo:link (*State).Iscfunction C.lua_iscfunction
func (*State) Isuserdata ¶ added in v0.9.7
llgo:link (*State).Isuserdata C.lua_isuserdata
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) Newuserdatauv ¶ added in v0.9.7
llgo:link (*State).Newuserdatauv C.lua_newuserdatauv
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
func (*State) Pushfstring ¶ added in v0.9.2
llgo:link (*State).Pushfstring C.lua_pushfstring
func (*State) Pushglobaltable ¶ added in v0.9.8
func (*State) Pushinteger ¶ added in v0.9.2
llgo:link (*State).Pushinteger C.lua_pushinteger
func (*State) Pushlightuserdata ¶ added in v0.9.7
llgo:link (*State).Pushlightuserdata C.lua_pushlightuserdata
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()
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) Pushthread ¶ added in v0.9.8
llgo:link (*State).Pushthread C.lua_pushthread
func (*State) Resetthread ¶ added in v0.9.8
llgo:link (*State).Resetthread C.lua_resetthread
func (*State) Setcstacklimit ¶ added in v0.9.8
llgo:link (*State).Setcstacklimit C.lua_setcstacklimit
func (*State) Setiuservalue ¶ added in v0.9.8
llgo:link (*State).Setiuservalue C.lua_setiuservalue
func (*State) Setmetatable ¶ added in v0.9.4
llgo:link (*State).Setmetatable C.lua_setmetatable
func (*State) Setupvalue ¶ added in v0.9.8
llgo:link (*State).Setupvalue C.lua_setupvalue
func (*State) Setwarnf ¶ added in v0.9.8
func (L *State) Setwarnf(f WarnFunction, ud c.Pointer)
llgo:link (*State).Setwarnf C.lua_setwarnf
func (*State) Stringtonumber ¶ added in v0.9.8
llgo:link (*State).Stringtonumber C.lua_stringtonumber
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
func (*State) Touserdata ¶ added in v0.9.7
llgo:link (*State).Touserdata C.lua_touserdata
func (*State) Upvaluejoin ¶ added in v0.9.8
llgo:link (*State).Upvaluejoin C.lua_upvaluejoin
type WarnFunction ¶ added in v0.9.8
llgo:type C