package vendor:lua/5.1
Overview
Bindings for Lua 5.1.
Index
Constants (67)
- AUTHORS
- COLIBNAME
- COPYRIGHT
- DBLIBNAME
- ENVIRONINDEX
- ERRERR
- ERRFILE
- ERRMEM
- ERRRUN
- ERRSYNTAX
- EXTRASPACE
- GCCOLLECT
- GCCOUNT
- GCCOUNTB
- GCRESTART
- GCSETPAUSE
- GCSETSTEPMUL
- GCSTEP
- GCSTOP
- GLOBALSINDEX
- GNAME
- HOOKCALL
- HOOKCOUNT
- HOOKLINE
- HOOKRET
- HOOKTAILRET
- IDSIZE
- IOLIBNAME
- LOADLIBNAME
- LUA_SHARED
- LUA_WASM_LIB
- L_BUFFERSIZE
- MASKCALL
- MASKCOUNT
- MASKLINE
- MASKRET
- MATHLIBNAME
- MAXALIGNVAL
- MAXSTACK
- MINSTACK
- MULTRET
- NOREF
- NUMTYPES
- OK
- OPEQ
- OPLE
- OPLT
- OSLIBNAME
- REFNIL
- REGISTRYINDEX
- RELEASE
- SIGNATURE
- STRLIBNAME
- TABLIBNAME
- TBOOLEAN
- TFUNCTION
- TLIGHTUSERDATA
- TNIL
- TNONE
- TNUMBER
- TSTRING
- TTABLE
- TTHREAD
- TUSERDATA
- VERSION
- VERSION_NUM
- YIELD
Variables (1)
Procedures (155)
L_… (44)
- L_addchar
- L_addlstring
- L_addsize
- L_addstring
- L_addvalue
- L_argcheck
- L_argerror
- L_buffinit
- L_callmeta
- L_checkany
- L_checkinteger
- L_checknumber
- L_checkoption
- L_checkstack
- L_checkstring
- L_checktype
- L_checkudata
- L_dofile
- L_dostring
- L_error
- L_findtable
- L_getmetafield
- L_getmetatable
- L_gsub
- L_loadbuffer
- L_loadfile
- L_loadstring
- L_newmetatable
- L_newstate
- L_openlib
- L_openlibs
- L_opt
- L_optinteger
- L_optnumber
- L_optstring
- L_prepbuffer
- L_pushresult
- L_putchar
- L_ref
- L_register
- L_typename
- L_typerror
- L_unref
- L_where
- atpanic
- call
- checkstack
- close
- concat
- cpcall
- createtable
- dump
- equal
- error
- gc
- getallocf
- getfenv
- getfield
- getgccount
- getglobal
- gethook
- gethookcount
- gethookmask
- getinfo
- getlocal
- getmetatable
- getref
- getregistry
- getstack
- gettable
- gettop
- getupvalue
- insert
- isboolean
- iscfunction
- isfunction
- islightuserdata
- isnil
- isnone
- isnoneornil
- isnumber
- isstring
- istable
- isthread
- isuserdata
- lessthan
- load
- newstate
- newtable
- newthread
- newuserdata
- next
- objlen
- open
- pcall
- pop
- pushboolean
- pushcclosure
- pushcfunction
- pushfstring
- pushinteger
- pushlightuserdata
- pushliteral
- pushlstring
- pushnil
- pushnumber
- pushstring
- pushthread
- pushvalue
- pushvfstring
- rawequal
- rawget
- rawgeti
- rawset
- rawseti
- ref
- register
- remove
- replace
- resume
- setallocf
- setfenv
- setfield
- setglobal
- sethook
- setlevel
- setlocal
- setmetatable
- settable
- settop
- setupvalue
- status
- strlen
- toboolean
- tocfunction
- tointeger
- tolstring
- tonumber
- topointer
- tostring
- tothread
- touserdata
- type
- typename
- unref
- xmove
- yield
Procedure Groups (0)
This section is empty.
`#config` values (2)
Types
Alloc ¶
** Type for memory-allocation functions
CFunction ¶
** Type for C functions registered with Lua
Related Procedures With Parameters
Matching Procedures (1)
Chunkreader ¶
Chunkreader :: Reader
Chunkwriter ¶
Chunkwriter :: Writer
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) nups: i32, // (u) number of upvalues linedefined: i32, // (S) lastlinedefined: i32, // (S) short_src: [60]u8 `fmt:"s"`, // private part i_ci: i32, }
activation record
GCWhat ¶
GCWhat :: enum i32 { STOP = 0, RESTART = 1, COLLECT = 2, COUNT = 3, COUNTB = 4, STEP = 5, SETPAUSE = 6, SETSTEPMUL = 7, }
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, TAILRET = 4, }
Related Constants
Integer ¶
Integer :: distinct i64
type for integer functions
Related Procedures With Parameters
Related Procedures With Returns
L_Buffer ¶
L_Buffer :: struct { p: [^]u8, // buffer address lvl: i32, // number of strings in the stack (level) L: ^State, buffer: [512]u8, }
Related Procedures With Parameters
L_Reg ¶
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, ERRFILE = 6, }
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
Constants
AUTHORS ¶
AUTHORS :: "R. Ierusalimschy, L. H. de Figueiredo & W. Celes"
COLIBNAME ¶
COLIBNAME :: "coroutine"
COPYRIGHT ¶
COPYRIGHT :: "Copyright (C) 1994-2012 Lua.org, PUC-Rio"
DBLIBNAME ¶
DBLIBNAME :: "debug"
ENVIRONINDEX ¶
ENVIRONINDEX :: -10001
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.
GCCOLLECT ¶
GCCOLLECT :: GCWhat.COLLECT
GCCOUNT ¶
GCCOUNT :: GCWhat.COUNT
GCCOUNTB ¶
GCCOUNTB :: GCWhat.COUNTB
GCRESTART ¶
GCRESTART :: GCWhat.RESTART
GCSETPAUSE ¶
GCSETPAUSE :: GCWhat.SETPAUSE
GCSETSTEPMUL ¶
GCSETSTEPMUL :: GCWhat.SETSTEPMUL
GCSTEP ¶
GCSTEP :: GCWhat.STEP
GCSTOP ¶
GCSTOP :: GCWhat.STOP
GLOBALSINDEX ¶
GLOBALSINDEX :: -10002
GNAME ¶
GNAME :: "_G"
HOOKCALL ¶
HOOKCALL :: HookEvent.CALL
HOOKCOUNT ¶
HOOKCOUNT :: HookEvent.COUNT
HOOKLINE ¶
HOOKLINE :: HookEvent.LINE
HOOKRET ¶
HOOKRET :: HookEvent.RET
HOOKTAILRET ¶
HOOKTAILRET :: HookEvent.TAILRET
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.1 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
OPEQ ¶
OPEQ :: CompareOp.EQ
OPLE ¶
OPLE :: CompareOp.LE
OPLT ¶
OPLT :: CompareOp.LT
OSLIBNAME ¶
OSLIBNAME :: "os"
REFNIL ¶
REFNIL :: -1
REGISTRYINDEX ¶
REGISTRYINDEX :: -10000
RELEASE ¶
RELEASE :: "Lua 5.1.5"
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 5.1"
VERSION_NUM ¶
VERSION_NUM :: 501
YIELD ¶
YIELD :: Status.YIELD
Variables
Procedures
L_addlstring ¶C · luaL_addlstringSource · lua.odin:550
L_addstring ¶C · luaL_addstringSource · lua.odin:551
L_addvalue ¶C · luaL_addvalueSource · lua.odin:552
L_addvalue :: proc "c" (B: ^L_Buffer) ---
L_argerror ¶C · luaL_argerrorSource · lua.odin:476
L_buffinit ¶C · luaL_buffinitSource · lua.odin:548
L_callmeta ¶C · luaL_callmetaSource · lua.odin:474
L_checkany ¶C · luaL_checkanySource · lua.odin:490
L_checkinteger ¶C · luaL_checkintegerSource · lua.odin:484
L_checknumber ¶C · luaL_checknumberSource · lua.odin:481
L_checkoption ¶C · luaL_checkoptionSource · lua.odin:498
L_checkstack ¶C · luaL_checkstackSource · lua.odin:488
L_checktype ¶C · luaL_checktypeSource · lua.odin:489
L_checkudata ¶C · luaL_checkudataSource · lua.odin:493
L_error ¶C · luaL_errorSource · lua.odin:496
L_findtable ¶C · luaL_findtableSource · lua.odin:513
L_getmetafield ¶C · luaL_getmetafieldSource · lua.odin:473
L_gsub ¶C · luaL_gsubSource · lua.odin:511
L_loadbuffer ¶C · luaL_loadbufferSource · lua.odin:506
L_loadfile ¶C · luaL_loadfileSource · lua.odin:504
L_loadstring ¶C · luaL_loadstringSource · lua.odin:507
L_newmetatable ¶C · luaL_newmetatableSource · lua.odin:492
L_newstate ¶C · luaL_newstateSource · lua.odin:509
L_newstate :: proc "c" () -> ^State ---
L_openlib ¶C · luaL_openlibSource · lua.odin:471
L_openlibs ¶C · luaL_openlibsSource · lua.odin:452
L_openlibs :: proc "c" (L: ^State) ---
L_optinteger ¶C · luaL_optintegerSource · lua.odin:485
L_optnumber ¶C · luaL_optnumberSource · lua.odin:482
L_prepbuffer ¶C · luaL_prepbufferSource · lua.odin:549
L_pushresult ¶C · luaL_pushresultSource · lua.odin:553
L_pushresult :: proc "c" (B: ^L_Buffer) ---
L_putchar ¶
L_putchar :: L_addchar
L_ref ¶C · luaL_refSource · lua.odin:501
L_register ¶C · luaL_registerSource · lua.odin:472
L_typerror ¶C · luaL_typerrorSource · lua.odin:475
L_unref ¶C · luaL_unrefSource · lua.odin:502
L_where ¶C · luaL_whereSource · lua.odin:495
atpanic ¶C · lua_atpanicSource · lua.odin:274
call ¶C · lua_callSource · lua.odin:364
checkstack ¶C · lua_checkstackSource · lua.odin:287
close ¶C · lua_closeSource · lua.odin:271
close :: proc "c" (L: ^State) ---
concat ¶C · lua_concatSource · lua.odin:401
cpcall ¶C · lua_cpcallSource · lua.odin:367
createtable ¶C · lua_createtableSource · lua.odin:342
dump ¶C · lua_dumpSource · lua.odin:372
equal ¶C · lua_equalSource · lua.odin:303
error ¶C · lua_errorSource · lua.odin:397
getallocf ¶C · lua_getallocfSource · lua.odin:403
getfenv ¶C · lua_getfenvSource · lua.odin:345
getfield ¶C · lua_getfieldSource · lua.odin:338
gethook ¶C · lua_gethookSource · lua.odin:420
gethookcount ¶C · lua_gethookcountSource · lua.odin:422
gethookmask ¶C · lua_gethookmaskSource · lua.odin:421
getinfo ¶C · lua_getinfoSource · lua.odin:413
getlocal ¶C · lua_getlocalSource · lua.odin:414
getmetatable ¶C · lua_getmetatableSource · lua.odin:344
getregistry ¶
getregistry :: proc "c" (L: ^State) {…}
getstack ¶C · lua_getstackSource · lua.odin:412
gettable ¶C · lua_gettableSource · lua.odin:337
gettop ¶C · lua_gettopSource · lua.odin:281
getupvalue ¶C · lua_getupvalueSource · lua.odin:416
insert ¶C · lua_insertSource · lua.odin:285
iscfunction ¶C · lua_iscfunctionSource · lua.odin:298
isnumber ¶C · lua_isnumberSource · lua.odin:296
isstring ¶C · lua_isstringSource · lua.odin:297
isuserdata ¶C · lua_isuserdataSource · lua.odin:299
lessthan ¶C · lua_lessthanSource · lua.odin:305
load ¶C · lua_loadSource · lua.odin:369
newstate ¶C · lua_newstateSource · lua.odin:270
newtable ¶
newtable :: proc "c" (L: ^State) {…}
newthread ¶C · lua_newthreadSource · lua.odin:272
newuserdata ¶C · lua_newuserdataSource · lua.odin:343
next ¶C · lua_nextSource · lua.odin:399
objlen ¶C · lua_objlenSource · lua.odin:311
open_base ¶C · luaopen_baseSource · lua.odin:441
open_debug ¶C · luaopen_debugSource · lua.odin:447
open_io ¶C · luaopen_ioSource · lua.odin:443
open_math ¶C · luaopen_mathSource · lua.odin:446
open_os ¶C · luaopen_osSource · lua.odin:444
open_package ¶C · luaopen_packageSource · lua.odin:448
open_string ¶C · luaopen_stringSource · lua.odin:445
open_table ¶C · luaopen_tableSource · lua.odin:442
pcall ¶C · lua_pcallSource · lua.odin:366
pushboolean ¶C · lua_pushbooleanSource · lua.odin:329
pushcclosure ¶C · lua_pushcclosureSource · lua.odin:328
pushfstring ¶C · lua_pushfstringSource · lua.odin:327
pushinteger ¶C · lua_pushintegerSource · lua.odin:323
pushlightuserdata ¶C · lua_pushlightuserdataSource · lua.odin:330
pushliteral ¶
pushliteral :: pushstring
pushlstring ¶C · lua_pushlstringSource · lua.odin:324
pushnil ¶C · lua_pushnilSource · lua.odin:321
pushnil :: proc "c" (L: ^State) ---
pushnumber ¶C · lua_pushnumberSource · lua.odin:322
pushstring ¶C · lua_pushstringSource · lua.odin:325
pushthread ¶C · lua_pushthreadSource · lua.odin:331
pushvalue ¶C · lua_pushvalueSource · lua.odin:283
pushvfstring ¶C · lua_pushvfstringSource · lua.odin:326
rawequal ¶C · lua_rawequalSource · lua.odin:304
rawget ¶C · lua_rawgetSource · lua.odin:339
rawgeti ¶C · lua_rawgetiSource · lua.odin:340
rawset ¶C · lua_rawsetSource · lua.odin:354
rawseti ¶C · lua_rawsetiSource · lua.odin:355
remove ¶C · lua_removeSource · lua.odin:284
replace ¶C · lua_replaceSource · lua.odin:286
resume ¶C · lua_resumeSource · lua.odin:380
setallocf ¶C · lua_setallocfSource · lua.odin:404
setfenv ¶C · lua_setfenvSource · lua.odin:357
setfield ¶C · lua_setfieldSource · lua.odin:353
sethook ¶C · lua_sethookSource · lua.odin:419
setlocal ¶C · lua_setlocalSource · lua.odin:415
setmetatable ¶C · lua_setmetatableSource · lua.odin:356
settable ¶C · lua_settableSource · lua.odin:352
settop ¶C · lua_settopSource · lua.odin:282
setupvalue ¶C · lua_setupvalueSource · lua.odin:417
status ¶C · lua_statusSource · lua.odin:381
toboolean ¶C · lua_tobooleanSource · lua.odin:309
tocfunction ¶C · lua_tocfunctionSource · lua.odin:312
tointeger ¶C · lua_tointegerSource · lua.odin:308
tolstring ¶C · lua_tolstringSource · lua.odin:310
tonumber ¶C · lua_tonumberSource · lua.odin:307
topointer ¶C · lua_topointerSource · lua.odin:315
tothread ¶C · lua_tothreadSource · lua.odin:314
touserdata ¶C · lua_touserdataSource · lua.odin:313
type ¶C · lua_typeSource · lua.odin:300
typename ¶C · lua_typenameSource · lua.odin:301
xmove ¶C · lua_xmoveSource · lua.odin:289
yield ¶C · lua_yieldSource · lua.odin:379
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