MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / lua_topointer

Function lua_topointer

Source/Misc/lua/src/lua.c:2250–2261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2248
2249
2250LUA_API const void *lua_topointer (lua_State *L, int idx) {
2251StkId o = index2adr(L, idx);
2252switch (ttype(o)) {
2253case LUA_TTABLE: return hvalue(o);
2254case LUA_TFUNCTION: return clvalue(o);
2255case LUA_TTHREAD: return thvalue(o);
2256case LUA_TUSERDATA:
2257case LUA_TLIGHTUSERDATA:
2258return lua_touserdata(L, idx);
2259default: return NULL;
2260}
2261}
2262
2263
2264

Callers 2

luaL_tolstringFunction · 0.85
luaB_tostringFunction · 0.85

Calls 2

index2adrFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected