MCPcopy Create free account
hub / github.com/defold/defold / lua_topointer

Function lua_topointer

engine/lua/src/lua/lapi.c:401–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399
400
401LUA_API const void *lua_topointer (lua_State *L, int idx) {
402 StkId o = index2adr(L, idx);
403 switch (ttype(o)) {
404 case LUA_TTABLE: return hvalue(o);
405 case LUA_TFUNCTION: return clvalue(o);
406 case LUA_TTHREAD: return thvalue(o);
407 case LUA_TUSERDATA:
408 case LUA_TLIGHTUSERDATA:
409 return lua_touserdata(L, idx);
410 default: return NULL;
411 }
412}
413
414
415

Callers 5

DoLuaPPrintTableFunction · 0.85
DoCheckTableSizeFunction · 0.85
DoCheckTableFunction · 0.85
LuaCheckTableFunction · 0.85
luaB_tostringFunction · 0.85

Calls 2

index2adrFunction · 0.85
lua_touserdataFunction · 0.85

Tested by 1

LuaCheckTableFunction · 0.68