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

Function check_penarray_native

library/LuaApi.cpp:972–982  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

970using Screen::PenArray;
971
972static PenArray *check_penarray_native(lua_State *L, int index)
973{
974 lua_rawgetp(L, LUA_REGISTRYINDEX, &DFHACK_PENARRAY_TOKEN);
975
976 if (!lua_getmetatable(L, index) || !lua_rawequal(L, -1, -2))
977 luaL_argerror(L, index, "not a penarray object");
978
979 lua_pop(L, 2);
980
981 return (PenArray*)lua_touserdata(L, index);
982}
983
984static int dfhack_penarray_new(lua_State *L)
985{

Callers 5

dfhack_penarray_clearFunction · 0.85
dfhack_penarray_get_dimsFunction · 0.85
dfhack_penarray_get_tileFunction · 0.85
dfhack_penarray_set_tileFunction · 0.85
dfhack_penarray_drawFunction · 0.85

Calls 5

lua_rawgetpFunction · 0.85
lua_getmetatableFunction · 0.85
lua_rawequalFunction · 0.85
luaL_argerrorFunction · 0.85
lua_touserdataFunction · 0.85

Tested by

no test coverage detected