MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / lua_topointer

Function lua_topointer

src/Chain/libraries/glua/lapi.cpp:432–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430
431
432LUA_API const void *lua_topointer(lua_State *L, int idx) {
433 StkId o = index2addr(L, idx);
434 switch (ttype(o)) {
435 case LUA_TTABLE: return hvalue(o);
436 case LUA_TLCL: return clLvalue(o);
437 case LUA_TCCL: return clCvalue(o);
438 case LUA_TLCF: return lua_cast(void *, lua_cast(size_t, fvalue(o)));
439 case LUA_TTHREAD: return thvalue(o);
440 case LUA_TUSERDATA: return getudatamem(uvalue(o));
441 case LUA_TLIGHTUSERDATA: return pvalue(o);
442 default: return nullptr;
443 }
444}
445
446
447

Callers 3

tojsonstring_with_nestedFunction · 0.85
toprotoFunction · 0.85

Calls 1

index2addrFunction · 0.85

Tested by

no test coverage detected