aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
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/libmime
parent1fc2eaa7b39eb81deafe925bb56fc8d7cd3de078 (diff)
downloadrspamd-8238dc0a23a0c654dc25e6debe738ae3321a46ce.tar.gz
rspamd-8238dc0a23a0c654dc25e6debe738ae3321a46ce.zip
[Project] Start optimization of userdata hashing
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/message.c8
-rw-r--r--src/libmime/scan_result.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 3acc935e6..84870a8b0 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.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.
@@ -994,7 +994,7 @@ rspamd_message_from_data(struct rspamd_task *task, const guchar *start,
rspamd_lua_setclass(L, "rspamd{mimepart}", -1);
*pmime = part;
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;
if (lua_pcall(L, 2, 2, 0) != 0) {
@@ -1447,7 +1447,7 @@ void rspamd_message_process(struct rspamd_task *task)
rspamd_lua_setclass(L, "rspamd{mimepart}", -1);
*pmime = part;
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;
if (lua_pcall(L, 2, 2, err_idx) != 0) {
@@ -1519,7 +1519,7 @@ void rspamd_message_process(struct rspamd_task *task)
rspamd_lua_setclass(L, "rspamd{mimepart}", -1);
*pmime = part;
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;
if (lua_pcall(L, 2, 0, err_idx) != 0) {
diff --git a/src/libmime/scan_result.c b/src/libmime/scan_result.c
index a6bc0cb8b..5c89b6560 100644
--- a/src/libmime/scan_result.c
+++ b/src/libmime/scan_result.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.
@@ -566,7 +566,7 @@ rspamd_task_insert_result_full(struct rspamd_task *task,
if (!rspamd_lua_universal_pcall(L, mres->symbol_cbref,
G_STRLOC, 1, "uss", &err,
- "rspamd{task}", task, symbol, mres->name ? mres->name : "default")) {
+ rspamd_task_classname, task, symbol, mres->name ? mres->name : "default")) {
msg_warn_task("cannot call for symbol_cbref for result %s: %e",
mres->name ? mres->name : "default", err);
g_error_free(err);