Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several lua issues #283

Merged
merged 4 commits into from
Feb 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix lua compile issues
Issue: #282
  • Loading branch information
vstakhov committed Feb 6, 2024
commit 708f5e21e3d85f56cdcbcbc418d8725f53bf390b
7 changes: 3 additions & 4 deletions lua/lua_ucl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand Down Expand Up @@ -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);
Expand Down