diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml index bcc22ec..ddb16b7 100644 --- a/.github/workflows/makefile.yml +++ b/.github/workflows/makefile.yml @@ -12,10 +12,13 @@ jobs: runs-on: ubuntu-latest steps: + - name: Install Lua + run: sudo apt-get install -y liblua5.4-dev lua5.4 + - uses: actions/checkout@v3 - name: configure - run: ./autogen.sh && ./configure + run: ./autogen.sh && ./configure --enable-lua - name: Install dependencies run: make diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e23994..5968dce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT(libucl C) SET(LIBUCL_VERSION_MAJOR 0) SET(LIBUCL_VERSION_MINOR 9) -SET(LIBUCL_VERSION_PATCH 0) +SET(LIBUCL_VERSION_PATCH 1) SET(LIBUCL_VERSION "${LIBUCL_VERSION_MAJOR}.${LIBUCL_VERSION_MINOR}.${LIBUCL_VERSION_PATCH}") diff --git a/Makefile.unix b/Makefile.unix index a2b0f8b..29b994a 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -4,7 +4,7 @@ LD ?= gcc C_COMMON_FLAGS ?= -fPIC -Wall -W -Wno-unused-parameter -Wno-pointer-sign -I./include -I./uthash -I./src -I./klib MAJOR_VERSION = 0 MINOR_VERSION = 9 -PATCH_VERSION = 0 +PATCH_VERSION = 1 VERSION = "$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION)" SONAME = libucl.so SONAME_FULL = $(SONAME).$(MAJOR_VERSION) diff --git a/configure.ac b/configure.ac index a27a8f5..3c35ff0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ m4_define([maj_ver], [0]) m4_define([med_ver], [9]) -m4_define([min_ver], [0]) -m4_define([so_version], [9:0:0]) +m4_define([min_ver], [1]) +m4_define([so_version], [9:0:1]) m4_define([ucl_version], [maj_ver.med_ver.min_ver]) AC_INIT([libucl],[ucl_version],[https://github.com/vstakhov/libucl],[libucl]) diff --git a/lua/lua_ucl.c b/lua/lua_ucl.c index c2e39c4..d6be69e 100644 --- a/lua/lua_ucl.c +++ b/lua/lua_ucl.c @@ -406,7 +406,6 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags) /* Table iterate */ if (is_array) { - int i; if (!is_implicit) { top = ucl_object_typed_new (UCL_ARRAY); @@ -416,7 +415,7 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags) top = NULL; } - for (i = 1; i <= max; i ++) { + for (size_t i = 1; i <= max; i ++) { lua_pushinteger (L, i); lua_gettable (L, idx); @@ -886,8 +885,8 @@ lua_ucl_parser_parse_text (lua_State *L) t = lua_touserdata (L, 2); } else if (lua_type (L, 2) == LUA_TSTRING) { - const gchar *s; - gsize len; + const char *s; + size_t len; static struct _rspamd_lua_text st_t; s = lua_tolstring (L, 2, &len); diff --git a/src/ucl_emitter.c b/src/ucl_emitter.c index a8158d8..97d8f61 100644 --- a/src/ucl_emitter.c +++ b/src/ucl_emitter.c @@ -266,6 +266,7 @@ ucl_emitter_common_start_array (struct ucl_emitter_context *ctx, func->ucl_emitter_append_len (",\n", 2, func->ud); } } + ucl_add_tabs (func, ctx->indent, compact); } ucl_emitter_print_key (print_key, ctx, obj, compact); @@ -325,6 +326,7 @@ ucl_emitter_common_start_object (struct ucl_emitter_context *ctx, func->ucl_emitter_append_len (",\n", 2, func->ud); } } + ucl_add_tabs (func, ctx->indent, compact); } ucl_emitter_print_key (print_key, ctx, obj, compact); @@ -472,11 +474,11 @@ ucl_emitter_common_elt (struct ucl_emitter_context *ctx, ucl_emitter_finish_object (ctx, obj, compact, !print_key); break; case UCL_OBJECT: - ucl_emitter_common_start_object (ctx, obj, false, print_key, compact); + ucl_emitter_common_start_object (ctx, obj, true, print_key, compact); ucl_emitter_common_end_object (ctx, obj, compact); break; case UCL_ARRAY: - ucl_emitter_common_start_array (ctx, obj, false, print_key, compact); + ucl_emitter_common_start_array (ctx, obj, true, print_key, compact); ucl_emitter_common_end_array (ctx, obj, compact); break; case UCL_USERDATA: