benilla-re systems structs docs

luaopen_math

function · lua · orchestration

Address
0x7fb470 · 110 bytes, up to 0x7fb4dd
Meaning
Opens the math library of 24 functions, math.pi and the global __pow
Confidence
verified, proof two
Finding
ui/luastate#the-library-scripts-see

Finding: The library scripts see in ui: the Lua state, its library and C functions

The base table holds setglobal, getglobal, eight debug functions, seterrorhandler, geterrorhandler, error, getmetatable, setmetatable, getfenv, setfenv, next, ipairs, pairs, type, tonumber, tostring, unpack, rawequal, rawget, rawset, assert, gcinfo, collectgarbage, loadstring, pcall, xpcall, date, time and debugstack, 36 in all. There is no print, dofile, loadfile, require, _G, _VERSION, no io, os, debug or coroutine table. debugload, debuginfo, debugprint, debugdump, debugbreak and debugtimestamp return nothing and do nothing; the other two are debugprofilestart and debugprofilestop. setglobal(name, v) sets the global to the top value through lua_settable, so setglobal("x") sets x to "x"; getglobal(name) reads it through lua_gettable, so the globals' metatable applies. math adds pi and sets the global __pow; bit holds bnot, band, bor, bxor, lshift, rshift, arshift and mod.

The derivation is in the doc.

Callers 1

Callees 5

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