MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lua_topointer

Function lua_topointer

app/redis-6.2.6/deps/lua/src/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 3

luaB_tostringFunction · 0.70
ldbCatStackValueRecFunction · 0.50
printFunction · 0.50

Calls 2

index2adrFunction · 0.85
lua_touserdataFunction · 0.70

Tested by

no test coverage detected