diff options
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r-- | src/lua/lua_common.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h index 1d39d0c52..f5a4967ba 100644 --- a/src/lua/lua_common.h +++ b/src/lua/lua_common.h @@ -1,5 +1,5 @@ /* - * Copyright 2024 Vsevolod Stakhov + * Copyright 2025 Vsevolod Stakhov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -421,6 +421,8 @@ void luaopen_tensor(lua_State *L); void luaopen_parsers(lua_State *L); +void luaopen_shingle(lua_State *L); + void rspamd_lua_dostring(const char *line); double rspamd_lua_normalize(struct rspamd_config *cfg, @@ -454,6 +456,12 @@ struct rspamd_dns_resolver *lua_check_dns_resolver(lua_State *L, int pos); struct rspamd_lua_url *lua_check_url(lua_State *L, int pos); +/** + * Creates a new shingle object from the existing shingle + */ +struct rspamd_shingle; +void lua_newshingle(lua_State *L, const struct rspamd_shingle *sh); + enum rspamd_lua_parse_arguments_flags { RSPAMD_LUA_PARSE_ARGUMENTS_DEFAULT = 0, RSPAMD_LUA_PARSE_ARGUMENTS_IGNORE_MISSING, |