]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-lua: Add DLUA_TABLE_ENUM_NOPREFIX()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 14 Jun 2022 11:00:16 +0000 (14:00 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 15 Jun 2022 20:24:42 +0000 (20:24 +0000)
src/lib-lua/dlua-script-private.h

index e6c82734bfcfc0c85e247fd76373c2d5fa2509a0..b38cabd4c22e66e27237ee0807f3de6f3e54e5c8 100644 (file)
@@ -19,6 +19,8 @@
                                    .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_NOPREFIX(prefix, n) { .name = #n, \
+                            .type = DLUA_TABLE_VALUE_INTEGER, .v.i = (prefix ## 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), \