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

Function lua_topointer

freebsd/contrib/openzfs/module/lua/lapi.c:440–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438
439
440LUA_API const void *lua_topointer (lua_State *L, int idx) {
441 StkId o = index2addr(L, idx);
442 switch (ttype(o)) {
443 case LUA_TTABLE: return hvalue(o);
444 case LUA_TLCL: return clLvalue(o);
445 case LUA_TCCL: return clCvalue(o);
446 case LUA_TLCF: return cast(void *, cast(size_t, fvalue(o)));
447 case LUA_TTHREAD: return thvalue(o);
448 case LUA_TUSERDATA:
449 case LUA_TLIGHTUSERDATA:
450 return lua_touserdata(L, idx);
451 default: return NULL;
452 }
453}
454
455
456

Callers 1

luaL_tolstringFunction · 0.70

Calls 2

index2addrFunction · 0.85
lua_touserdataFunction · 0.70

Tested by

no test coverage detected