#undef LUA_TABLE_SETBOOL
#define LUA_TABLE_SETBOOL(field) \
- lua_pushboolean(script->L, req->field ? 1 : 0); \
+ lua_pushboolean(script->L, req->field); \
lua_setfield(script->L, -2, #field);
LUA_TABLE_SETBOOL(skip_password_check);
#define lua_isstring(L, n) (lua_isstring(L, n) == 1)
#define lua_isnumber(L, n) (lua_isnumber(L, n) == 1)
#define lua_toboolean(L, n) (lua_toboolean(L, n) == 1)
+#define lua_pushboolean(L, b) lua_pushboolean((L), (b) ? 1 : 0)
#define DLUA_TABLE_STRING(n, s) { .name = n, .type = DLUA_TABLE_VALUE_STRING, .v.s = s }
#define DLUA_TABLE_INTEGER(n, i) { .name = n, .type = DLUA_TABLE_VALUE_INTEGER, .v.i = i }
lua_pushnumber(script->L, values->v.d);
break;
case DLUA_TABLE_VALUE_BOOLEAN:
- lua_pushboolean(script->L, values->v.b ? 1 : 0);
+ lua_pushboolean(script->L, values->v.b);
break;
case DLUA_TABLE_VALUE_NULL:
lua_pushnil(script->L);