| 221 | } |
| 222 | |
| 223 | static bool get_bool_field(lua_State *L, bool *pf, int idx, const char *name, bool defval) { |
| 224 | lua_getfield(L, idx, name); |
| 225 | bool nil = lua_isnil(L, -1); |
| 226 | if (nil) |
| 227 | *pf = defval; |
| 228 | else |
| 229 | *pf = lua_toboolean(L, -1); |
| 230 | lua_pop(L, 1); |
| 231 | return !nil; |
| 232 | } |
| 233 | |
| 234 | static void decode_pen(lua_State *L, Pen &pen, int idx) |
| 235 | { |
no test coverage detected