benilla-re systems structs docs

lua_version

function · lua · unreached

Address
0x6f4430 · 6 bytes, up to 0x6f4435
Meaning
Returns the version text
Confidence
verified, proof two
Finding
lua/api#state-and-upvalues

Finding: State and upvalues in lua: the C API

lua_atpanic swaps the panic function of the global state, lua_getgcthreshold and lua_getgccount answer the collector threshold and the allocated bytes in kilobytes, and lua_version answers the text Lua 5.0. lua_getupvalue and lua_setupvalue read and write the nth upvalue of a function through aux_upvalue, which answers its name: the empty string for a C function, the debug name for a Lua one, null past the count.

functionnamedecided by
0x6f3020lua_atpanicswaps [G+0x2c] with edx (0x6f3023, 0x6f3026)
0x6f43e0lua_getgcthreshold[G+0x24] >> 10 (0x6f43e6)
0x6f43f0lua_getgccount[G+0x28] >> 10 (0x6f43f6)
0x6f4430lua_versionreturns the string Lua 5.0 (0x6f4430)
0x6f4660lua_getupvaluecalls aux_upvalue (0x6f4671), copies the value to the top (0x6f46b3)
0x6f46e0aux_upvaluetag 6 (0x6f4745), C byte; a C function answers the empty string and closure+n*16, a Lua one the debug name
0x6f47b0lua_setupvaluecalls aux_upvalue (0x6f47c0), copies the top into the slot

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.