aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_map.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-05 14:26:20 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-05 14:26:20 +0100
commitdedb8506630e0de3f384d19c781993dedd73a2d5 (patch)
tree4855da0433bd019a03c727ad53175bd77745d228 /src/lua/lua_map.c
parenta4c9f20fa7f30124253bbcc807eaec9cce65ee48 (diff)
downloadrspamd-dedb8506630e0de3f384d19c781993dedd73a2d5.tar.gz
rspamd-dedb8506630e0de3f384d19c781993dedd73a2d5.zip
[Feature] Use rspamd specific type checks for userdata
Diffstat (limited to 'src/lua/lua_map.c')
-rw-r--r--src/lua/lua_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_map.c b/src/lua/lua_map.c
index 439ea2941..c01088343 100644
--- a/src/lua/lua_map.c
+++ b/src/lua/lua_map.c
@@ -108,7 +108,7 @@ struct lua_map_callback_data {
struct rspamd_lua_map *
lua_check_map (lua_State * L, gint pos)
{
- void *ud = luaL_checkudata (L, pos, "rspamd{map}");
+ void *ud = rspamd_lua_check_udata (L, pos, "rspamd{map}");
luaL_argcheck (L, ud != NULL, pos, "'map' expected");
return ud ? *((struct rspamd_lua_map **)ud) : NULL;
}
@@ -542,7 +542,7 @@ lua_map_get_key (lua_State * L)
key_num = htonl (key_num);
}
else if (lua_type (L, 2) == LUA_TUSERDATA) {
- ud = luaL_checkudata (L, 2, "rspamd{ip}");
+ ud = rspamd_lua_check_udata (L, 2, "rspamd{ip}");
if (ud != NULL) {
addr = *((struct rspamd_lua_ip **)ud);