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

Function lua_topointer

other_src/lua/src/lapi.cpp:423–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421
422
423LUA_API const void *lua_topointer (lua_State *L, int idx) {
424 StkId o = index2adr(L, idx);
425 switch (ttype(o)) {
426 case LUA_TTABLE: return hvalue(o);
427 case LUA_TFUNCTION: return clvalue(o);
428 case LUA_TTHREAD: return thvalue(o);
429 case LUA_TUSERDATA:
430 case LUA_TLIGHTUSERDATA:
431 return lua_touserdata(L, idx);
432 default: return NULL;
433 }
434}
435
436
437

Callers 4

luaB_tostringFunction · 0.70
printFunction · 0.50
ScriptPrintPointerMethod · 0.50
PrintStackMethod · 0.50

Calls 2

index2adrFunction · 0.70
lua_touserdataFunction · 0.70

Tested by

no test coverage detected