MCPcopy Create free account
hub / github.com/DFHack/dfhack / lua_touserdata

Function lua_touserdata

depends/lua/src/lapi.c:413–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411
412
413LUA_API void *lua_touserdata (lua_State *L, int idx) {
414 StkId o = index2addr(L, idx);
415 switch (ttnov(o)) {
416 case LUA_TUSERDATA: return getudatamem(uvalue(o));
417 case LUA_TLIGHTUSERDATA: return pvalue(o);
418 default: return NULL;
419 }
420}
421
422
423LUA_API lua_State *lua_tothread (lua_State *L, int idx) {

Callers 15

is_null_userdataFunction · 0.85
CheckDFObjectMethod · 0.85
GetOutputMethod · 0.85
dfhack_event_lenFunction · 0.85
dfhack_event_tostringFunction · 0.85
dfhack_event_newindexFunction · 0.85
dfhack_event_callFunction · 0.85
InvokeMethod · 0.85
is_nullFunction · 0.85
lua_item_referenceMethod · 0.85
lua_item_readMethod · 0.85
lua_item_writeMethod · 0.85

Calls 1

index2addrFunction · 0.85

Tested by

no test coverage detected