aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_mimepart.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_mimepart.c
parenta4c9f20fa7f30124253bbcc807eaec9cce65ee48 (diff)
downloadrspamd-dedb8506630e0de3f384d19c781993dedd73a2d5.tar.gz
rspamd-dedb8506630e0de3f384d19c781993dedd73a2d5.zip
[Feature] Use rspamd specific type checks for userdata
Diffstat (limited to 'src/lua/lua_mimepart.c')
-rw-r--r--src/lua/lua_mimepart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c
index 2eedeeabe..b0bbce85f 100644
--- a/src/lua/lua_mimepart.c
+++ b/src/lua/lua_mimepart.c
@@ -226,7 +226,7 @@ static const struct luaL_reg mimepartlib_m[] = {
static struct mime_text_part *
lua_check_textpart (lua_State * L)
{
- void *ud = luaL_checkudata (L, 1, "rspamd{textpart}");
+ void *ud = rspamd_lua_check_udata (L, 1, "rspamd{textpart}");
luaL_argcheck (L, ud != NULL, 1, "'textpart' expected");
return ud ? *((struct mime_text_part **)ud) : NULL;
}
@@ -234,7 +234,7 @@ lua_check_textpart (lua_State * L)
static struct mime_part *
lua_check_mimepart (lua_State * L)
{
- void *ud = luaL_checkudata (L, 1, "rspamd{mimepart}");
+ void *ud = rspamd_lua_check_udata (L, 1, "rspamd{mimepart}");
luaL_argcheck (L, ud != NULL, 1, "'mimepart' expected");
return ud ? *((struct mime_part **)ud) : NULL;
}