commit d2ef77b: [Minor] Fix old broken logic compatibility
Vsevolod Stakhov
vsevolod at highsecure.ru
Thu Mar 12 15:00:08 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-03-12 14:56:38 +0000
URL: https://github.com/rspamd/rspamd/commit/d2ef77b1e75f6f2093f5d62ca17e5e7a3abcbb64 (HEAD -> master)
[Minor] Fix old broken logic compatibility
---
contrib/libucl/lua_ucl.c | 15 ++++++++-------
1 file 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
More information about the Commits
mailing list