aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libucl/lua_ucl.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-12 14:56:38 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-03-12 14:56:38 +0000
commitd2ef77b1e75f6f2093f5d62ca17e5e7a3abcbb64 (patch)
tree1e2498ec93b81b05a02dd7f6d7781e187a4cca7a /contrib/libucl/lua_ucl.c
parent74b817d34fc56a02aad8fc05d3610bbde549a2e6 (diff)
downloadrspamd-d2ef77b1e75f6f2093f5d62ca17e5e7a3abcbb64.tar.gz
rspamd-d2ef77b1e75f6f2093f5d62ca17e5e7a3abcbb64.zip
[Minor] Fix old broken logic compatibility
Diffstat (limited to 'contrib/libucl/lua_ucl.c')
-rw-r--r--contrib/libucl/lua_ucl.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/contrib/libucl/lua_ucl.c b/contrib/libucl/lua_ucl.c
index a9f1d8924..fdffad7f1 100644
--- a/contrib/libucl/lua_ucl.c
+++ b/contrib/libucl/lua_ucl.c
@@ -82,6 +82,13 @@ static ucl_object_t* ucl_object_lua_fromelt (lua_State *L, int idx, ucl_string_f
static void *ucl_null;
+
+enum lua_ucl_push_flags {
+ LUA_UCL_DEFAULT_FLAGS = 0,
+ LUA_UCL_ALLOW_ARRAY = (1u << 0u),
+ LUA_UCL_CONVERT_NIL = (1u << 1u),
+};
+
/**
* Push a single element of an object to lua
* @param L
@@ -93,7 +100,7 @@ ucl_object_lua_push_element (lua_State *L, const char *key,
const ucl_object_t *obj, int flags)
{
lua_pushstring (L, key);
- ucl_object_push_lua_common (L, obj, flags);
+ ucl_object_push_lua_common (L, obj, flags|LUA_UCL_ALLOW_ARRAY);
lua_settable (L, -3);
}
@@ -133,12 +140,6 @@ lua_ucl_userdata_emitter (void *ud)
return fd->ret;
}
-enum lua_ucl_push_flags {
- LUA_UCL_DEFAULT_FLAGS = 0,
- LUA_UCL_ALLOW_ARRAY = (1u << 0u),
- LUA_UCL_CONVERT_NIL = (1u << 1u),
-};
-
/**
* Push a single object to lua
* @param L