lua_tothread
function · lua · boundary
- Address
0x6f3770· 21 bytes, up to0x6f3784- Meaning
- Returns the state of a thread value, else null
- Confidence
- verified, proof two
- Finding
- lua/api#reading-values
Finding: Reading values in lua: the C API
Six functions read a value out of its slot. lua_toboolean answers 0 for nil and false and 1
for anything else, lua_strlen the length of a string or of a number converted to one,
lua_tocfunction the C function of a C closure, lua_touserdata the block of a full userdata
or the pointer of a light one, lua_tothread the state of a thread, and lua_topointer a
pointer for a userdata, table, function or thread. A slot that does not fit answers 0.
| function | name | decided by |
|---|---|---|
0x6f3660 | lua_toboolean | tag 0 and tag 1 with payload 0 answer 0 (0x6f366b, 0x6f366f, 0x6f3677) |
0x6f36e0 | lua_strlen | string length at [str+0xc] (0x6f36f7), luaV_tostring first for a number (0x6f3701) |
0x6f3720 | lua_tocfunction | tag 6 at 0x6f3729, C byte at closure+6, function at closure+0xc |
0x6f3740 | lua_touserdata | tag 2 returns the payload, tag 7 returns the payload plus 16 (0x6f375c) |
0x6f3770 | lua_tothread | tag 8 at 0x6f3779, payload returned |
0x6f3790 | lua_topointer | jump table at 0x6f37a9 on tag minus 2; userdata tags jump to 0x6f3740 (0x6f37bc), tags 5, 6 and 8 return the payload |
The derivation is in the doc.
Callers 1
Callees 1
Calls and jumps by a bare address, from tables/calls.tsv.