summaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-17 17:15:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-08-17 17:15:16 +0100
commitdf48f709f804739d1b084174c46af04b10d2fede (patch)
tree2bb3270a4db81104bfd3c8abf9b19381e5d926b4 /src/lua/lua_common.h
parentac1dfb0beccf74a9f3ec82dfc257ea326532370d (diff)
downloadrspamd-df48f709f804739d1b084174c46af04b10d2fede.tar.gz
rspamd-df48f709f804739d1b084174c46af04b10d2fede.zip
Rework lua function names to avoid ambiguity.
Diffstat (limited to 'src/lua/lua_common.h')
-rw-r--r--src/lua/lua_common.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/lua/lua_common.h b/src/lua/lua_common.h
index a9f0d399a..78bf80fdb 100644
--- a/src/lua/lua_common.h
+++ b/src/lua/lua_common.h
@@ -60,14 +60,14 @@ struct lua_locked_state {
/**
* Create and register new class
*/
-void lua_newclass (lua_State *L,
+void rspamd_lua_new_class (lua_State *L,
const gchar *classname,
const struct luaL_reg *methods);
/**
* Create and register new class with static methods
*/
-void lua_newclass_full (lua_State *L,
+void rspamd_lua_new_class_full (lua_State *L,
const gchar *classname,
const gchar *static_name,
const struct luaL_reg *methods,
@@ -76,56 +76,56 @@ void lua_newclass_full (lua_State *L,
/**
* Set class name for object at @param objidx position
*/
-void lua_setclass (lua_State *L, const gchar *classname, gint objidx);
+void rspamd_lua_setclass (lua_State *L, const gchar *classname, gint objidx);
/**
* Set index of table to value (like t['index'] = value)
*/
-void lua_set_table_index (lua_State *L, const gchar *index, const gchar *value);
+void rspamd_lua_table_set (lua_State *L, const gchar *index, const gchar *value);
/**
* Get string value of index in a table (return t['index'])
*/
-const gchar * lua_get_table_index_str (lua_State *L, const gchar *index);
+const gchar * rspamd_lua_table_get (lua_State *L, const gchar *index);
/**
* Convert classname to string
*/
-gint lua_class_tostring (lua_State *L);
+gint rspamd_lua_class_tostring (lua_State *L);
/**
* Check whether the argument at specified index is of the specified class
*/
-gpointer lua_check_class (lua_State *L, gint index, const gchar *name);
+gpointer rspamd_lua_check_class (lua_State *L, gint index, const gchar *name);
/**
* Initialize lua and bindings
*/
-lua_State * init_lua (struct rspamd_config *cfg);
+lua_State * rspamd_lua_init (struct rspamd_config *cfg);
/**
* Load and initialize lua plugins
*/
-gboolean init_lua_filters (struct rspamd_config *cfg);
+gboolean rspamd_init_lua_filters (struct rspamd_config *cfg);
/**
* Initialize new locked lua_State structure
*/
-struct lua_locked_state * init_lua_locked (struct rspamd_config *cfg);
+struct lua_locked_state * rspamd_init_lua_locked (struct rspamd_config *cfg);
/**
* Free locked state structure
*/
-void free_lua_locked (struct lua_locked_state *st);
+void rspamd_free_lua_locked (struct lua_locked_state *st);
/**
* Push lua ip address
*/
-void lua_ip_push (lua_State *L, rspamd_inet_addr_t *addr);
+void rspamd_lua_ip_push (lua_State *L, rspamd_inet_addr_t *addr);
/**
* Push ip address from a string (nil is pushed if a string cannot be converted)
*/
-void lua_ip_push_fromstring (lua_State *L, const gchar *ip_str);
+void rspamd_lua_ip_push_fromstring (lua_State *L, const gchar *ip_str);
/**
* Create type error
@@ -169,55 +169,55 @@ gint luaopen_dns_resolver (lua_State * L);
gint luaopen_rsa (lua_State * L);
gint luaopen_ip (lua_State * L);
-gint lua_call_filter (const gchar *function, struct rspamd_task *task);
-gint lua_call_chain_filter (const gchar *function,
+gint rspamd_lua_call_filter (const gchar *function, struct rspamd_task *task);
+gint rspamd_lua_call_chain_filter (const gchar *function,
struct rspamd_task *task,
gint *marks,
guint number);
-double lua_consolidation_func (struct rspamd_task *task,
+double rspamd_lua_consolidation_func (struct rspamd_task *task,
const gchar *metric_name,
const gchar *function_name);
-gboolean lua_call_expression_func (gpointer lua_data,
+gboolean rspamd_lua_call_expression_func (gpointer lua_data,
struct rspamd_task *task,
GList *args,
gboolean *res);
-void lua_call_post_filters (struct rspamd_task *task);
-void lua_call_pre_filters (struct rspamd_task *task);
-void add_luabuf (const gchar *line);
+void rspamd_lua_call_post_filters (struct rspamd_task *task);
+void rspamd_lua_call_pre_filters (struct rspamd_task *task);
+void rspamd_lua_dostring (const gchar *line);
/* Classify functions */
-GList * call_classifier_pre_callbacks (struct rspamd_classifier_config *ccf,
+GList * rspamd_lua_call_cls_pre_callbacks (struct rspamd_classifier_config *ccf,
struct rspamd_task *task,
gboolean is_learn,
gboolean is_spam,
lua_State *L);
-double call_classifier_post_callbacks (struct rspamd_classifier_config *ccf,
+double rspamd_lua_call_cls_post_callbacks (struct rspamd_classifier_config *ccf,
struct rspamd_task *task,
double in,
lua_State *L);
-double lua_normalizer_func (struct rspamd_config *cfg,
+double rspamd_lua_normalize (struct rspamd_config *cfg,
long double score,
void *params);
/* Config file functions */
-void lua_post_load_config (struct rspamd_config *cfg);
-void lua_process_element (struct rspamd_config *cfg,
+void rspamd_lua_post_load_config (struct rspamd_config *cfg);
+void rspamd_lua_process_elt (struct rspamd_config *cfg,
const gchar *name,
const gchar *module_name,
struct rspamd_module_opt *opt,
gint idx,
gboolean allow_meta);
-gboolean lua_handle_param (struct rspamd_task *task,
+gboolean rspamd_lua_handle_param (struct rspamd_task *task,
gchar *mname,
gchar *optname,
enum lua_var_type expected_type,
gpointer *res);
-gboolean lua_check_condition (struct rspamd_config *cfg,
+gboolean rspamd_lua_check_condition (struct rspamd_config *cfg,
const gchar *condition);
-void lua_dumpstack (lua_State *L);
+void rspamd_lua_dumpstack (lua_State *L);
-struct memory_pool_s * lua_check_mempool (lua_State * L);
+struct memory_pool_s * rspamd_lua_check_mempool (lua_State * L);
#endif /* WITH_LUA */