Skip to content

Commit

Permalink
[Minor] Fix old broken logic compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Mar 12, 2020
1 parent 74b817d commit d2ef77b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions contrib/libucl/lua_ucl.c
Expand Up @@ -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
Expand All @@ -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);
}

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

0 comments on commit d2ef77b

Please sign in to comment.