package vendor:lua/5.2
Overview
Bindings for Lua 5.2.
Index
Constants (85)
- AUTHORS
- BITLIBNAME
- COLIBNAME
- COPYRIGHT
- DBLIBNAME
- ERRERR
- ERRFILE
- ERRMEM
- ERRRUN
- ERRSYNTAX
- EXTRASPACE
- FIRSTPSEUDOIDX
- GCCOLLECT
- GCCOUNT
- GCCOUNTB
- GCGEN
- GCINC
- GCISRUNNING
- GCRESTART
- GCSETMAJORINC
- GCSETPAUSE
- GCSETSTEPMUL
- GCSTEP
- GCSTOP
- GNAME
- HOOKCALL
- HOOKCOUNT
- HOOKLINE
- HOOKRET
- HOOKTAILCALL
- IDSIZE
- IOLIBNAME
- LOADLIBNAME
- LUA_SHARED
- LUA_WASM_LIB
- L_BUFFERSIZE
- MASKCALL
- MASKCOUNT
- MASKLINE
- MASKRET
- MATHLIBNAME
- MAXALIGNVAL
- MAXSTACK
- MINSTACK
- MULTRET
- NOREF
- NUMTYPES
- OK
- OPADD
- OPDIV
- OPEQ
- OPLE
- OPLT
- OPMOD
- OPMUL
- OPPOW
- OPSUB
- OPUNM
- OSLIBNAME
- REFNIL
- REGISTRYINDEX
- RELEASE
RIDX_… (3)
- SIGNATURE
- STRLIBNAME
- TABLIBNAME
- TBOOLEAN
- TFUNCTION
- TLIGHTUSERDATA
- TNIL
- TNONE
- TNUMBER
- TSTRING
- TTABLE
- TTHREAD
- TUSERDATA
- VERSION
VERSION_… (4)
- VERSUFFIX
- YIELD
Variables (1)
Procedures (173)
L_… (57)
- L_addchar
- L_addlstring
- L_addsize
- L_addstring
- L_addvalue
- L_argcheck
- L_argerror
- L_buffinit
- L_buffinitsize
- L_callmeta
- L_checkany
- L_checkinteger
- L_checknumber
- L_checkoption
- L_checkstack
- L_checkstring
- L_checktype
- L_checkudata
- L_checkunsigned
- L_checkversion
- L_dofile
- L_dostring
- L_error
- L_execresult
- L_fileresult
- L_getmetafield
- L_getmetatable
- L_getsubtable
- L_gsub
- L_len
- L_loadbuffer
- L_loadfile
- L_loadstring
- L_newlib
- L_newlibtable
- L_newmetatable
- L_newstate
- L_openlibs
- L_opt
- L_optinteger
- L_optnumber
- L_optstring
- L_optunsigned
- L_prepbuffer
- L_prepbuffsize
- L_pushresult
- L_pushresultsize
- L_ref
- L_requiref
- L_setfuncs
- L_setmetatable
- L_testudata
- L_tostring
- L_traceback
- L_typename
- L_unref
- L_where
- absindex
- arith
- atpanic
- call
- checkstack
- close
- compare
- concat
- copy
- createtable
- dump
- error
- gc
- getallocf
- getctx
- getfield
- getglobal
- gethook
- gethookcount
- gethookmask
- getinfo
- getlocal
- getmetatable
- getstack
- gettable
- gettop
- getupvalue
- getuservalue
- insert
- isboolean
- iscfunction
- isfunction
- islightuserdata
- isnil
- isnone
- isnoneornil
- isnumber
- isstring
- istable
- isthread
- isuserdata
- len
- load
- newstate
- newtable
- newthread
- newuserdata
- next
- pcall
- pop
- pushboolean
- pushcclosure
- pushcfunction
- pushfstring
- pushglobaltable
- pushinteger
- pushlightuserdata
- pushliteral
- pushlstring
- pushnil
- pushnumber
- pushstring
- pushthread
- pushunsigned
- pushvalue
- pushvfstring
- rawequal
- rawget
- rawgeti
- rawgetp
- rawlen
- rawset
- rawseti
- rawsetp
- register
- remove
- replace
- resume
- setallocf
- setfield
- setglobal
- sethook
- setlocal
- setmetatable
- settable
- settop
- setupvalue
- setuservalue
- status
- toboolean
- tocfunction
- tointeger
- tolstring
- tonumber
- topointer
- tostring
- tothread
- tounsigned
- touserdata
- type
- typename
- upvalueid
- upvaluejoin
- version
- xmove
- yield
Procedure Groups (0)
This section is empty.
`#config` values (2)
Types
Alloc ¶
** Type for memory-allocation functions
ArithOp ¶
ArithOp :: enum i32 { ADD = 0, // ORDER TM, ORDER OP SUB = 1, MUL = 2, DIV = 3, MOD = 4, POW = 5, UNM = 6, }
Related Constants
Debug ¶
Debug :: struct { event: HookEvent, name: cstring, // (n) namewhat: cstring, // (n) 'global', 'local', 'field', 'method' what: cstring, // (S) 'Lua', 'C', 'main', 'tail' source: cstring, // (S) currentline: i32, // (l) linedefined: i32, // (S) lastlinedefined: i32, // (S) nups: u8, // (u) number of upvalues nparams: u8, // (u) number of parameters isvararg: bool, // (u) istailcall: bool, // (t) short_src: [60]u8 `fmt:"s"`, // private part i_ci: rawptr, }
activation record
GCWhat ¶
GCWhat :: enum i32 { STOP = 0, RESTART = 1, COLLECT = 2, COUNT = 3, COUNTB = 4, STEP = 5, SETPAUSE = 6, SETSTEPMUL = 7, SETMAJORINC = 8, ISRUNNING = 9, GEN = 10, INC = 11, }
Related Constants
Hook ¶
Functions to be called by the debugger in specific events
HookEvent ¶
HookEvent :: enum i32 { CALL = 0, RET = 1, LINE = 2, COUNT = 3, TAILCALL = 4, }
Related Constants
Integer ¶
Integer :: distinct i64
type for integer functions
Related Procedures With Parameters
Related Procedures With Returns
L_Buffer ¶
L_Buffer :: struct { b: [^]u8, // buffer address size: uint, // buffer size n: uint, // number of characters in buffer L: ^State, initb: [512]u8, }
Related Procedures With Parameters
Number ¶
Number :: distinct f64
type of numbers in Lua
Related Procedures With Parameters
Related Procedures With Returns
Reader ¶
** Type for functions that read/write blocks when loading/dumping Lua chunks
Status ¶
Status :: enum i32 { OK = 0, YIELD = 1, ERRRUN = 2, ERRSYNTAX = 3, ERRMEM = 4, ERRERR = 5, ERRGCMM = 6, ERRFILE = 7, }
Related Procedures With Returns
Related Constants
Type ¶
Type :: enum i32 { NONE = -1, NIL = 0, BOOLEAN = 1, LIGHTUSERDATA = 2, NUMBER = 3, STRING = 4, TABLE = 5, FUNCTION = 6, USERDATA = 7, THREAD = 8, }
Related Constants
Unsigned ¶
Unsigned :: distinct u64
unsigned integer type
Related Procedures With Parameters
Related Procedures With Returns
Constants
AUTHORS ¶
AUTHORS :: "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
BITLIBNAME ¶
BITLIBNAME :: "bit32"
COLIBNAME ¶
COLIBNAME :: "coroutine"
COPYRIGHT ¶
COPYRIGHT :: RELEASE + " Copyright (C) 1994-2015 Lua.org, PUC-Rio"
DBLIBNAME ¶
DBLIBNAME :: "debug"
ERRERR ¶
ERRERR :: Status.ERRERR
ERRFILE ¶
ERRFILE :: Status.ERRFILE
ERRMEM ¶
ERRMEM :: Status.ERRMEM
ERRRUN ¶
ERRRUN :: Status.ERRRUN
ERRSYNTAX ¶
ERRSYNTAX :: Status.ERRSYNTAX
EXTRASPACE ¶
EXTRASPACE :: size_of(rawptr)
@@ 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.
FIRSTPSEUDOIDX ¶
FIRSTPSEUDOIDX :: -MAXSTACK - 1000
GCCOLLECT ¶
GCCOLLECT :: GCWhat.COLLECT
GCCOUNT ¶
GCCOUNT :: GCWhat.COUNT
GCCOUNTB ¶
GCCOUNTB :: GCWhat.COUNTB
GCGEN ¶
GCGEN :: GCWhat.GEN
GCINC ¶
GCINC :: GCWhat.INC
GCISRUNNING ¶
GCISRUNNING :: GCWhat.ISRUNNING
GCRESTART ¶
GCRESTART :: GCWhat.RESTART
GCSETMAJORINC ¶
GCSETMAJORINC :: GCWhat.SETMAJORINC
GCSETPAUSE ¶
GCSETPAUSE :: GCWhat.SETPAUSE
GCSETSTEPMUL ¶
GCSETSTEPMUL :: GCWhat.SETSTEPMUL
GCSTEP ¶
GCSTEP :: GCWhat.STEP
GCSTOP ¶
GCSTOP :: GCWhat.STOP
GNAME ¶
GNAME :: "_G"
HOOKCALL ¶
HOOKCALL :: HookEvent.CALL
HOOKCOUNT ¶
HOOKCOUNT :: HookEvent.COUNT
HOOKLINE ¶
HOOKLINE :: HookEvent.LINE
HOOKRET ¶
HOOKRET :: HookEvent.RET
HOOKTAILCALL ¶
HOOKTAILCALL :: HookEvent.TAILCALL
IDSIZE ¶
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.
IOLIBNAME ¶
IOLIBNAME :: "io"
LOADLIBNAME ¶
LOADLIBNAME :: "package"
LUA_SHARED ¶
LUA_SHARED :: #config(LUA_SHARED, false)
-define:LUA_SHARED=false
LUA_WASM_LIB ¶
LUA_WASM_LIB :: #config(LUA_WASM_LIB, "env.o")
-define:LUA_WASM_LIB="env.o"
L_BUFFERSIZE ¶
L_BUFFERSIZE: i32 : c.int(512 when ODIN_OS == .Windows else 8192 when ODIN_OS == .Linux else 1024)
@@ LUAL_BUFFERSIZE is the buffer size used by the lauxlib buffer system. ** In Lua 5.2 it is the C library's BUFSIZ, and it has to match the value the Lua library was compiled with: ** 512 with MSVC, 8192 with glibc, 1024 with the BSDs, macOS and musl.
MASKCALL ¶
MASKCALL :: HookMask{.CALL}
MASKCOUNT ¶
MASKCOUNT :: HookMask{.COUNT}
MASKLINE ¶
MASKLINE :: HookMask{.LINE}
MASKRET ¶
MASKRET :: HookMask{.RET}
MATHLIBNAME ¶
MATHLIBNAME :: "math"
MAXALIGNVAL ¶
MAXALIGNVAL :: max(align_of(Number), align_of(f64), align_of(rawptr), align_of(Integer), align_of(c.long))
MAXSTACK ¶
MAXSTACK :: 1000000
@@ LUAI_MAXSTACK limits the size of the Lua stack. ** CHANGE it if you need a different limit. This limit is arbitrary; ** its only purpose is to stop Lua from consuming unlimited stack ** space (and to reserve some numbers for pseudo-indices). ** (It must fit into max(size_t)/32.)
NUMTYPES ¶
NUMTYPES :: 9
OPADD ¶
OPADD :: ArithOp.ADD
OPDIV ¶
OPDIV :: ArithOp.DIV
OPEQ ¶
OPEQ :: CompareOp.EQ
OPLE ¶
OPLE :: CompareOp.LE
OPLT ¶
OPLT :: CompareOp.LT
OPMOD ¶
OPMOD :: ArithOp.MOD
OPMUL ¶
OPMUL :: ArithOp.MUL
OPPOW ¶
OPPOW :: ArithOp.POW
OPSUB ¶
OPSUB :: ArithOp.SUB
OPUNM ¶
OPUNM :: ArithOp.UNM
OSLIBNAME ¶
OSLIBNAME :: "os"
REFNIL ¶
REFNIL :: -1
REGISTRYINDEX ¶
REGISTRYINDEX :: FIRSTPSEUDOIDX
RELEASE ¶
RELEASE :: VERSION + "." + VERSION_RELEASE
RIDX_GLOBALS ¶
RIDX_GLOBALS :: 2
RIDX_LAST ¶
RIDX_LAST :: RIDX_GLOBALS
STRLIBNAME ¶
STRLIBNAME :: "string"
TABLIBNAME ¶
TABLIBNAME :: "table"
TBOOLEAN ¶
TBOOLEAN :: Type.BOOLEAN
TFUNCTION ¶
TFUNCTION :: Type.FUNCTION
TLIGHTUSERDATA ¶
TLIGHTUSERDATA :: Type.LIGHTUSERDATA
TNIL ¶
TNIL :: Type.NIL
TNONE ¶
TNONE :: Type.NONE
TNUMBER ¶
TNUMBER :: Type.NUMBER
TSTRING ¶
TSTRING :: Type.STRING
TTABLE ¶
TTABLE :: Type.TABLE
TTHREAD ¶
TTHREAD :: Type.THREAD
TUSERDATA ¶
TUSERDATA :: Type.USERDATA
VERSION ¶
VERSION :: "Lua " + VERSION_MAJOR + "." + VERSION_MINOR
VERSION_MAJOR ¶
VERSION_MAJOR :: "5"
VERSION_MINOR ¶
VERSION_MINOR :: "2"
VERSION_NUM ¶
VERSION_NUM :: 502
VERSION_RELEASE ¶
VERSION_RELEASE :: "4"
VERSUFFIX ¶
VERSUFFIX :: "_" + VERSION_MAJOR + "_" + VERSION_MINOR
version suffix for environment variable names
YIELD ¶
YIELD :: Status.YIELD
Variables
Procedures
L_addlstring ¶C · luaL_addlstringSource · lua.odin:657
L_addstring ¶C · luaL_addstringSource · lua.odin:658
L_addvalue ¶C · luaL_addvalueSource · lua.odin:659
L_addvalue :: proc "c" (B: ^L_Buffer) ---
L_argerror ¶C · luaL_argerrorSource · lua.odin:562
L_buffinit ¶C · luaL_buffinitSource · lua.odin:655
L_buffinitsize ¶C · luaL_buffinitsizeSource · lua.odin:662
L_callmeta ¶C · luaL_callmetaSource · lua.odin:559
L_checkany ¶C · luaL_checkanySource · lua.odin:578
L_checkinteger ¶C · luaL_checkintegerSource · lua.odin:570
L_checknumber ¶C · luaL_checknumberSource · lua.odin:567
L_checkoption ¶C · luaL_checkoptionSource · lua.odin:588
L_checkstack ¶C · luaL_checkstackSource · lua.odin:576
L_checktype ¶C · luaL_checktypeSource · lua.odin:577
L_checkudata ¶C · luaL_checkudataSource · lua.odin:583
L_checkunsigned ¶C · luaL_checkunsignedSource · lua.odin:572
L_error ¶C · luaL_errorSource · lua.odin:586
L_execresult ¶C · luaL_execresultSource · lua.odin:591
L_fileresult ¶C · luaL_fileresultSource · lua.odin:590
L_getmetafield ¶C · luaL_getmetafieldSource · lua.odin:558
L_getsubtable ¶C · luaL_getsubtableSource · lua.odin:612
L_gsub ¶C · luaL_gsubSource · lua.odin:608
L_len ¶C · luaL_lenSource · lua.odin:606
L_loadstring ¶C · luaL_loadstringSource · lua.odin:602
L_newmetatable ¶C · luaL_newmetatableSource · lua.odin:580
L_newstate ¶C · luaL_newstateSource · lua.odin:604
L_newstate :: proc "c" () -> ^State ---
L_openlibs ¶C · luaL_openlibsSource · lua.odin:533
L_openlibs :: proc "c" (L: ^State) ---
L_optinteger ¶C · luaL_optintegerSource · lua.odin:571
L_optnumber ¶C · luaL_optnumberSource · lua.odin:568
L_optunsigned ¶C · luaL_optunsignedSource · lua.odin:573
L_prepbuffsize ¶C · luaL_prepbuffsizeSource · lua.odin:656
L_pushresult ¶C · luaL_pushresultSource · lua.odin:660
L_pushresult :: proc "c" (B: ^L_Buffer) ---
L_pushresultsize ¶C · luaL_pushresultsizeSource · lua.odin:661
L_ref ¶C · luaL_refSource · lua.odin:594
L_requiref ¶C · luaL_requirefSource · lua.odin:616
L_setfuncs ¶C · luaL_setfuncsSource · lua.odin:610
L_setmetatable ¶C · luaL_setmetatableSource · lua.odin:581
L_testudata ¶C · luaL_testudataSource · lua.odin:582
L_traceback ¶C · luaL_tracebackSource · lua.odin:614
L_unref ¶C · luaL_unrefSource · lua.odin:595
L_where ¶C · luaL_whereSource · lua.odin:585
absindex ¶C · lua_absindexSource · lua.odin:331
arith ¶C · lua_arithSource · lua.odin:373
atpanic ¶C · lua_atpanicSource · lua.odin:322
checkstack ¶C · lua_checkstackSource · lua.odin:339
close ¶C · lua_closeSource · lua.odin:319
close :: proc "c" (L: ^State) ---
compare ¶C · lua_compareSource · lua.odin:375
concat ¶C · lua_concatSource · lua.odin:472
copy ¶C · lua_copySource · lua.odin:338
createtable ¶C · lua_createtableSource · lua.odin:405
dump ¶C · lua_dumpSource · lua.odin:442
error ¶C · lua_errorSource · lua.odin:468
getallocf ¶C · lua_getallocfSource · lua.odin:475
getctx ¶C · lua_getctxSource · lua.odin:433
getfield ¶C · lua_getfieldSource · lua.odin:400
getglobal ¶C · lua_getglobalSource · lua.odin:398
gethook ¶C · lua_gethookSource · lua.odin:495
gethookcount ¶C · lua_gethookcountSource · lua.odin:497
gethookmask ¶C · lua_gethookmaskSource · lua.odin:496
getinfo ¶C · lua_getinfoSource · lua.odin:485
getlocal ¶C · lua_getlocalSource · lua.odin:486
getmetatable ¶C · lua_getmetatableSource · lua.odin:407
getstack ¶C · lua_getstackSource · lua.odin:484
gettable ¶C · lua_gettableSource · lua.odin:399
gettop ¶C · lua_gettopSource · lua.odin:332
getupvalue ¶C · lua_getupvalueSource · lua.odin:488
getuservalue ¶C · lua_getuservalueSource · lua.odin:408
insert ¶C · lua_insertSource · lua.odin:336
iscfunction ¶C · lua_iscfunctionSource · lua.odin:350
isnumber ¶C · lua_isnumberSource · lua.odin:348
isstring ¶C · lua_isstringSource · lua.odin:349
isuserdata ¶C · lua_isuserdataSource · lua.odin:351
len ¶C · lua_lenSource · lua.odin:473
load ¶C · lua_loadSource · lua.odin:439
newstate ¶C · lua_newstateSource · lua.odin:318
newtable ¶
newtable :: proc "c" (L: ^State) {…}
newthread ¶C · lua_newthreadSource · lua.odin:320
newuserdata ¶C · lua_newuserdataSource · lua.odin:406
next ¶C · lua_nextSource · lua.odin:470
open_base ¶C · luaopen_baseSource · lua.odin:520
open_bit32 ¶C · luaopen_bit32Source · lua.odin:526
open_coroutine ¶C · luaopen_coroutineSource · lua.odin:521
open_debug ¶C · luaopen_debugSource · lua.odin:528
open_io ¶C · luaopen_ioSource · lua.odin:523
open_math ¶C · luaopen_mathSource · lua.odin:527
open_os ¶C · luaopen_osSource · lua.odin:524
open_package ¶C · luaopen_packageSource · lua.odin:529
open_string ¶C · luaopen_stringSource · lua.odin:525
open_table ¶C · luaopen_tableSource · lua.odin:522
pushboolean ¶C · lua_pushbooleanSource · lua.odin:390
pushcclosure ¶C · lua_pushcclosureSource · lua.odin:389
pushfstring ¶C · lua_pushfstringSource · lua.odin:388
pushglobaltable ¶
pushglobaltable :: proc "c" (L: ^State) {…}
pushinteger ¶C · lua_pushintegerSource · lua.odin:383
pushlightuserdata ¶C · lua_pushlightuserdataSource · lua.odin:391
pushliteral ¶
pushliteral :: pushstring
pushlstring ¶C · lua_pushlstringSource · lua.odin:385
pushnil ¶C · lua_pushnilSource · lua.odin:381
pushnil :: proc "c" (L: ^State) ---
pushnumber ¶C · lua_pushnumberSource · lua.odin:382
pushstring ¶C · lua_pushstringSource · lua.odin:386
pushthread ¶C · lua_pushthreadSource · lua.odin:392
pushunsigned ¶C · lua_pushunsignedSource · lua.odin:384
pushvalue ¶C · lua_pushvalueSource · lua.odin:334
pushvfstring ¶C · lua_pushvfstringSource · lua.odin:387
rawequal ¶C · lua_rawequalSource · lua.odin:374
rawget ¶C · lua_rawgetSource · lua.odin:401
rawgeti ¶C · lua_rawgetiSource · lua.odin:402
rawgetp ¶C · lua_rawgetpSource · lua.odin:403
rawlen ¶C · lua_rawlenSource · lua.odin:363
rawset ¶C · lua_rawsetSource · lua.odin:418
rawseti ¶C · lua_rawsetiSource · lua.odin:419
rawsetp ¶C · lua_rawsetpSource · lua.odin:420
remove ¶C · lua_removeSource · lua.odin:335
replace ¶C · lua_replaceSource · lua.odin:337
resume ¶C · lua_resumeSource · lua.odin:451
setallocf ¶C · lua_setallocfSource · lua.odin:476
setfield ¶C · lua_setfieldSource · lua.odin:417
setglobal ¶C · lua_setglobalSource · lua.odin:415
sethook ¶C · lua_sethookSource · lua.odin:494
setlocal ¶C · lua_setlocalSource · lua.odin:487
setmetatable ¶C · lua_setmetatableSource · lua.odin:421
settable ¶C · lua_settableSource · lua.odin:416
settop ¶C · lua_settopSource · lua.odin:333
setupvalue ¶C · lua_setupvalueSource · lua.odin:489
setuservalue ¶C · lua_setuservalueSource · lua.odin:422
status ¶C · lua_statusSource · lua.odin:452
toboolean ¶C · lua_tobooleanSource · lua.odin:361
tocfunction ¶C · lua_tocfunctionSource · lua.odin:364
tolstring ¶C · lua_tolstringSource · lua.odin:362
topointer ¶C · lua_topointerSource · lua.odin:367
tothread ¶C · lua_tothreadSource · lua.odin:366
touserdata ¶C · lua_touserdataSource · lua.odin:365
type ¶C · lua_typeSource · lua.odin:352
typename ¶C · lua_typenameSource · lua.odin:353
upvalueid ¶C · lua_upvalueidSource · lua.odin:491
upvaluejoin ¶C · lua_upvaluejoinSource · lua.odin:492
version ¶C · lua_versionSource · lua.odin:324
xmove ¶C · lua_xmoveSource · lua.odin:341
Procedure Groups
This section is empty.
`#config` values
- LUA_SHARED
-define:LUA_SHARED=false - LUA_WASM_LIB
-define:LUA_WASM_LIB="env.o"
Source Files
Generation Information
Generated with odin version dev-2026-11 (vendor "odin") Windows_amd64 @ 2026-11-28 21:05:09.772358800 +0000 UTC