| 641 | } |
| 642 | |
| 643 | static Pen *check_pen_native(lua_State *L, int index) |
| 644 | { |
| 645 | lua_rawgetp(L, LUA_REGISTRYINDEX, &DFHACK_PEN_TOKEN); |
| 646 | |
| 647 | if (!lua_getmetatable(L, index) || !lua_rawequal(L, -1, -2)) |
| 648 | luaL_argerror(L, index, "not a pen object"); |
| 649 | |
| 650 | lua_pop(L, 2); |
| 651 | |
| 652 | return (Pen*)lua_touserdata(L, index); |
| 653 | } |
| 654 | |
| 655 | void Lua::CheckPen(lua_State *L, Screen::Pen *pen, int index, bool allow_nil, bool allow_color) |
| 656 | { |
no test coverage detected