aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-05 14:24:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-05 14:24:16 +0100
commitb1247748157ccdc9a40c6255ece4e5d64f71c6a4 (patch)
tree7d7a78648f0311acd8bed0504c3954e8ef308e8e /src/lua/lua_common.h
parent9666a3a441bcf1cab3165bf0d98debd7b6ef3220 (diff)
downloadrspamd-b1247748157ccdc9a40c6255ece4e5d64f71c6a4.tar.gz
rspamd-b1247748157ccdc9a40c6255ece4e5d64f71c6a4.zip
[Feature] Add better method to check lua userdata types
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r--src/lua/lua_common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index 73be9e0c5..63039533c 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -346,5 +346,14 @@ gboolean lua_push_internet_address (lua_State *L, InternetAddress *ia);
*/
gsize lua_logger_out_type (lua_State *L, gint pos, gchar *outbuf,
gsize len);
+
+/**
+ * Safely checks userdata to match specified class
+ * @param L
+ * @param pos
+ * @param classname
+ */
+void *rspamd_lua_check_udata (lua_State *L, gint pos, const gchar *classname);
+
#endif /* WITH_LUA */
#endif /* RSPAMD_LUA_H */