summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-03-05 13:39:47 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-03-05 13:39:47 +0000
commit8238dc0a23a0c654dc25e6debe738ae3321a46ce (patch)
tree786d8a9a0e1e8928bb5be8c262e9f7baf32f655f /src/plugins
parent1fc2eaa7b39eb81deafe925bb56fc8d7cd3de078 (diff)
downloadrspamd-8238dc0a23a0c654dc25e6debe738ae3321a46ce.tar.gz
rspamd-8238dc0a23a0c654dc25e6debe738ae3321a46ce.zip
[Project] Start optimization of userdata hashing
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/fuzzy_check.c6
-rw-r--r--src/plugins/regexp.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 85db83d08..581c1c12d 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Vsevolod Stakhov
+ * Copyright 2024 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1566,7 +1566,7 @@ fuzzy_rule_check_mimepart(struct rspamd_task *task,
ptask = lua_newuserdata(L, sizeof(*ptask));
*ptask = task;
- rspamd_lua_setclass(L, "rspamd{task}", -1);
+ rspamd_lua_setclass(L, rspamd_task_classname, -1);
ppart = lua_newuserdata(L, sizeof(*ppart));
*ppart = part;
@@ -3510,7 +3510,7 @@ fuzzy_process_handler(struct rspamd_http_connection_entry *conn_ent,
lua_rawgeti(L, LUA_REGISTRYINDEX, rule->learn_condition_cb);
ptask = lua_newuserdata(L, sizeof(struct rspamd_task *));
*ptask = task;
- rspamd_lua_setclass(L, "rspamd{task}", -1);
+ rspamd_lua_setclass(L, rspamd_task_classname, -1);
if (lua_pcall(L, 1, LUA_MULTRET, err_idx) != 0) {
msg_err_task("call to fuzzy learn condition failed: %s",
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 59a84c507..83d2fc963 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 Vsevolod Stakhov
+ * Copyright 2024 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -475,7 +475,7 @@ rspamd_lua_call_expression_func(struct ucl_lua_funcdata *lua_data,
lua_rawgeti(L, LUA_REGISTRYINDEX, lua_data->idx);
/* Now we got function in top of stack */
ptask = lua_newuserdata(L, sizeof(struct rspamd_task *));
- rspamd_lua_setclass(L, "rspamd{task}", -1);
+ rspamd_lua_setclass(L, rspamd_task_classname, -1);
*ptask = task;
/* Now push all arguments */