lua_pushlstring
function · lua · boundary
- Address
0x6f3840· 78 bytes, up to0x6f388d- Meaning
- Pushes a string of a given length, interned
- Confidence
- verified, proof two
- Finding
- lua/api#pushing-values
Finding: Pushing values in lua: the C API
Seven functions create a value on the stack. lua_pushnumber stores tag 3 and a double,
lua_pushlstring and lua_pushvfstring and lua_pushfstring intern or format a string, and
lua_newuserdata and lua_newthread allocate an object, the first returning the address of its
block. lua_pushupvalues pushes every upvalue of the running C function and answers their count.
The five that allocate first run the collector when the allocation count [G+0x28] has reached
the threshold [G+0x24].
| function | name | decided by |
|---|---|---|
0x6f3810 | lua_pushnumber | tag 3 stored (0x6f3816), the double from the stack to +8 (0x6f382f), ret 8 |
0x6f3840 | lua_pushlstring | collector test (0x6f384f), tag 4 (0x6f3862), luaS_newlstr (0x6f3876) |
0x6f38c0 | lua_pushvfstring | collector test, then luaO_pushvfstring (0x6f38e3) with the caller's list |
0x6f38f0 | lua_pushfstring | collector test, luaO_pushvfstring (0x6f3912) on the address of its own arguments |
0x6f3030 | lua_newthread | collector test (0x6f3039), luaE_newthread (0x6f3047), tag 8 (0x6f304f) |
0x6f4560 | lua_newuserdata | luaS_newudata (0x6f457c), tag 7 (0x6f4584), result eax+16 (0x6f45a0) |
0x6f45b0 | lua_pushupvalues | count from closure+7 (0x6f45c7), growth check (0x6f45de), one 16-byte copy per upvalue (0x6f45f0 loop) |
The derivation is in the doc.
Callers 16
- lua_pushstring lua
- luaL_where lua
- luaL_setn lua
- getsizes lua
- luaL_getn lua
- emptybuffer lua
- luaL_loadfile lua
- ScriptPushFenvOverride ui
- ScriptIpairs ui
- ScriptPairs ui
- ScriptToString ui
- ScriptDebugStack ui
- luaopen_math lua
- str_sub lua
- push_captures lua
- push_onecapture lua
Callees 2
- luaC_collectgarbage lua
- luaS_newlstr lua
Calls and jumps by a bare address, from tables/calls.tsv.