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_cryptobox.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_cryptobox.c')
-rw-r--r-- | src/lua/lua_cryptobox.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c index 9e699c2df..65cb04174 100644 --- a/src/lua/lua_cryptobox.c +++ b/src/lua/lua_cryptobox.c @@ -120,7 +120,7 @@ static const struct luaL_reg cryptoboxhashlib_m[] = { static struct rspamd_cryptobox_pubkey * lua_check_cryptobox_pubkey (lua_State * L, int pos) { - void *ud = luaL_checkudata (L, pos, "rspamd{cryptobox_pubkey}"); + void *ud = rspamd_lua_check_udata (L, pos, "rspamd{cryptobox_pubkey}"); luaL_argcheck (L, ud != NULL, 1, "'cryptobox_pubkey' expected"); return ud ? *((struct rspamd_cryptobox_pubkey **)ud) : NULL; @@ -129,7 +129,7 @@ lua_check_cryptobox_pubkey (lua_State * L, int pos) static struct rspamd_cryptobox_keypair * lua_check_cryptobox_keypair (lua_State * L, int pos) { - void *ud = luaL_checkudata (L, pos, "rspamd{cryptobox_keypair}"); + void *ud = rspamd_lua_check_udata (L, pos, "rspamd{cryptobox_keypair}"); luaL_argcheck (L, ud != NULL, 1, "'cryptobox_keypair' expected"); return ud ? *((struct rspamd_cryptobox_keypair **)ud) : NULL; @@ -138,7 +138,7 @@ lua_check_cryptobox_keypair (lua_State * L, int pos) static rspamd_fstring_t * lua_check_cryptobox_sign (lua_State * L, int pos) { - void *ud = luaL_checkudata (L, pos, "rspamd{cryptobox_signature}"); + void *ud = rspamd_lua_check_udata (L, pos, "rspamd{cryptobox_signature}"); luaL_argcheck (L, ud != NULL, 1, "'cryptobox_signature' expected"); return ud ? *((rspamd_fstring_t **)ud) : NULL; @@ -147,7 +147,7 @@ lua_check_cryptobox_sign (lua_State * L, int pos) static rspamd_cryptobox_hash_state_t * lua_check_cryptobox_hash (lua_State * L, int pos) { - void *ud = luaL_checkudata (L, pos, "rspamd{cryptobox_hash}"); + void *ud = rspamd_lua_check_udata (L, pos, "rspamd{cryptobox_hash}"); luaL_argcheck (L, ud != NULL, 1, "'cryptobox_hash' expected"); return ud ? *((rspamd_cryptobox_hash_state_t **)ud) : NULL; |