MCPcopy Create free account
hub / github.com/DFHack/dfhack / GetOutput

Method GetOutput

library/LuaTools.cpp:297–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295static int DFHACK_OSTREAM_TOKEN = 0;
296
297color_ostream *DFHack::Lua::GetOutput(lua_State *L)
298{
299 lua_rawgetp(L, LUA_REGISTRYINDEX, &DFHACK_OSTREAM_TOKEN);
300 auto rv = (color_ostream*)lua_touserdata(L, -1);
301 lua_pop(L, 1);
302 return rv;
303}
304
305df::cur_lua_ostream_argument::cur_lua_ostream_argument(lua_State *state)
306{

Callers

nothing calls this directly

Calls 2

lua_rawgetpFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected