diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-05 14:26:20 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-05-05 14:26:20 +0100 |
commit | dedb8506630e0de3f384d19c781993dedd73a2d5 (patch) | |
tree | 4855da0433bd019a03c727ad53175bd77745d228 /src/lua/lua_classifier.c | |
parent | a4c9f20fa7f30124253bbcc807eaec9cce65ee48 (diff) | |
download | rspamd-dedb8506630e0de3f384d19c781993dedd73a2d5.tar.gz rspamd-dedb8506630e0de3f384d19c781993dedd73a2d5.zip |
[Feature] Use rspamd specific type checks for userdata
Diffstat (limited to 'src/lua/lua_classifier.c')
-rw-r--r-- | src/lua/lua_classifier.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/lua_classifier.c b/src/lua/lua_classifier.c index f777ba8aa..aaf3888df 100644 --- a/src/lua/lua_classifier.c +++ b/src/lua/lua_classifier.c @@ -59,7 +59,7 @@ static struct rspamd_statfile_config * lua_check_statfile (lua_State * L); static struct rspamd_classifier_config * lua_check_classifier (lua_State * L) { - void *ud = luaL_checkudata (L, 1, "rspamd{classifier}"); + void *ud = rspamd_lua_check_udata (L, 1, "rspamd{classifier}"); luaL_argcheck (L, ud != NULL, 1, "'classifier' expected"); return ud ? *((struct rspamd_classifier_config **)ud) : NULL; } @@ -96,7 +96,7 @@ call_classifier_pre_callback (struct rspamd_classifier_config *ccf, if (lua_istable (L, -1)) { lua_pushnil (L); while (lua_next (L, -2)) { - pst = luaL_checkudata (L, -1, "rspamd{statfile}"); + pst = rspamd_lua_check_udata (L, -1, "rspamd{statfile}"); if (pst) { res = g_list_prepend (res, *pst); } @@ -378,7 +378,7 @@ lua_statfile_get_param (lua_State *L) static struct rspamd_statfile_config * lua_check_statfile (lua_State * L) { - void *ud = luaL_checkudata (L, 1, "rspamd{statfile}"); + void *ud = rspamd_lua_check_udata (L, 1, "rspamd{statfile}"); luaL_argcheck (L, ud != NULL, 1, "'statfile' expected"); return ud ? *((struct rspamd_statfile_config **)ud) : NULL; } |