diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-25 14:59:00 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-25 17:46:11 +0000 |
commit | a0938d8ef20d506d30216febe0a15474689e518f (patch) | |
tree | 650c39afaee52b267c08c847e4d5395f690d3e31 /src/lua | |
parent | 61fd611fb7eb2fdd0038921f2681988cd64f36e0 (diff) | |
download | rspamd-a0938d8ef20d506d30216febe0a15474689e518f.tar.gz rspamd-a0938d8ef20d506d30216febe0a15474689e518f.zip |
Make lua_check_ip function public.
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_common.h | 5 | ||||
-rw-r--r-- | src/lua/lua_ip.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h index 7c532df4e..9fffa7127 100644 --- a/src/lua/lua_common.h +++ b/src/lua/lua_common.h @@ -123,6 +123,11 @@ void rspamd_free_lua_locked (struct lua_locked_state *st); void rspamd_lua_ip_push (lua_State *L, rspamd_inet_addr_t *addr); /** + * Return lua ip structure at the specified address + */ +struct rspamd_lua_ip * lua_check_ip (lua_State * L, gint pos); + +/** * Push ip address from a string (nil is pushed if a string cannot be converted) */ void rspamd_lua_ip_push_fromstring (lua_State *L, const gchar *ip_str); diff --git a/src/lua/lua_ip.c b/src/lua/lua_ip.c index 7dea2bfcc..7cd74c734 100644 --- a/src/lua/lua_ip.c +++ b/src/lua/lua_ip.c @@ -212,7 +212,7 @@ lua_ip_new (lua_State *L, struct rspamd_lua_ip *old) return ip; } -static struct rspamd_lua_ip * +struct rspamd_lua_ip * lua_check_ip (lua_State * L, gint pos) { void *ud = luaL_checkudata (L, pos, "rspamd{ip}"); |