diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-11 14:31:38 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-03-11 14:31:38 +0000 |
commit | f595d3331b4f8a94e1ceefca228b1fd5104d4f82 (patch) | |
tree | 4ca8fd7f65c69dea9df45c8cd49901a31547829a /contrib/libucl/lua_ucl.h | |
parent | a7108fde8fa77c6cb6e66186e6a490951747899d (diff) | |
download | rspamd-f595d3331b4f8a94e1ceefca228b1fd5104d4f82.tar.gz rspamd-f595d3331b4f8a94e1ceefca228b1fd5104d4f82.zip |
[Minor] Allow to push objects to lua replacing UCL_NULL
Diffstat (limited to 'contrib/libucl/lua_ucl.h')
-rw-r--r-- | contrib/libucl/lua_ucl.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/contrib/libucl/lua_ucl.h b/contrib/libucl/lua_ucl.h index da7e014b9..5b7f88e03 100644 --- a/contrib/libucl/lua_ucl.h +++ b/contrib/libucl/lua_ucl.h @@ -70,8 +70,16 @@ UCL_EXTERN ucl_object_t* ucl_object_lua_import_escape (lua_State *L, int idx); */ UCL_EXTERN int ucl_object_push_lua (lua_State *L, const ucl_object_t *obj, bool allow_array); +/** + * Push an object to lua replacing all ucl.null with `false` + * @param L lua state + * @param obj object to push + * @param allow_array traverse over implicit arrays + */ +UCL_EXTERN int ucl_object_push_lua_filter_nil (lua_State *L, + const ucl_object_t *obj, + bool allow_array); -UCL_EXTERN struct ucl_lua_funcdata* ucl_object_toclosure ( - const ucl_object_t *obj); +UCL_EXTERN struct ucl_lua_funcdata* ucl_object_toclosure (const ucl_object_t *obj); #endif /* LUA_UCL_H_ */ |