| 1104 | } |
| 1105 | |
| 1106 | int |
| 1107 | get_table_boolean_opt(lua_State *L, const char *name, int defval) |
| 1108 | { |
| 1109 | int ret = defval; |
| 1110 | |
| 1111 | lua_getfield(L, -1, name); |
| 1112 | if (lua_type(L, -1) != LUA_TNIL) { |
| 1113 | lua_pop(L, 1); |
| 1114 | return get_table_boolean(L, name); |
| 1115 | } |
| 1116 | lua_pop(L, 1); |
| 1117 | return ret; |
| 1118 | } |
| 1119 | |
| 1120 | /* opts[] is a null-terminated list */ |
| 1121 | int |
no test coverage detected