]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lua: Fix bracing in table helper macros
authorAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 24 Apr 2019 13:33:45 +0000 (16:33 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 24 Apr 2019 13:33:45 +0000 (16:33 +0300)
Was left broken in c304bc76

src/lib-lua/dlua-script-private.h

index 18b9eef7aaa759dc886df20e03bc396af909046c..bbacc2fcf96296e028ea768fdab01603a385c475 100644 (file)
@@ -29,9 +29,9 @@ void luaL_setmetatable (lua_State *L, const char *tname);
 
 #define DLUA_TABLE_STRING(n, val) { .name = (n), .type = DLUA_TABLE_VALUE_STRING, .v.s = (val) }
 #define DLUA_TABLE_INTEGER(n, val) { .name = (n), .type = DLUA_TABLE_VALUE_INTEGER, .v.i = (val) }
-#define DLUA_TABLE_ENUM(n) { .name = #n, .type = DLUA_TABLE_VALUE_INTEGER, .v.i = n }
+#define DLUA_TABLE_ENUM(n) { .name = #n, .type = DLUA_TABLE_VALUE_INTEGER, .v.i = (n) }
 #define DLUA_TABLE_DOUBLE(n, val) { .name = (n), .type = DLUA_TABLE_VALUE_DOUBLE, .v.d = (val) }
-#define DLUA_TABLE_BOOLEAN(n, val) { .name = (n), .type = DLUA_TABLE_VALUE_BOOLEAN, .v.b = val) }
+#define DLUA_TABLE_BOOLEAN(n, val) { .name = (n), .type = DLUA_TABLE_VALUE_BOOLEAN, .v.b = (val) }
 #define DLUA_TABLE_NULL(n, s) { .name = (n), .type = DLUA_TABLE_VALUE_NULL }
 #define DLUA_TABLE_END { .name = NULL }