From: Vsevolod Stakhov Date: Wed, 25 Feb 2015 14:59:00 +0000 (+0000) Subject: Make lua_check_ip function public. X-Git-Tag: 0.9.0~622 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0938d8ef20d506d30216febe0a15474689e518f;p=thirdparty%2Frspamd.git Make lua_check_ip function public. --- diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h index 7c532df4e8..9fffa7127b 100644 --- a/src/lua/lua_common.h +++ b/src/lua/lua_common.h @@ -122,6 +122,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) */ diff --git a/src/lua/lua_ip.c b/src/lua/lua_ip.c index 7dea2bfcce..7cd74c7342 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}");