diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-05 13:39:47 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-05 13:39:47 +0000 |
commit | 8238dc0a23a0c654dc25e6debe738ae3321a46ce (patch) | |
tree | 786d8a9a0e1e8928bb5be8c262e9f7baf32f655f /src/controller.c | |
parent | 1fc2eaa7b39eb81deafe925bb56fc8d7cd3de078 (diff) | |
download | rspamd-8238dc0a23a0c654dc25e6debe738ae3321a46ce.tar.gz rspamd-8238dc0a23a0c654dc25e6debe738ae3321a46ce.zip |
[Project] Start optimization of userdata hashing
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/controller.c b/src/controller.c index f05105e91..8df2dc248 100644 --- a/src/controller.c +++ b/src/controller.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. @@ -34,6 +34,7 @@ #include "utlist.h" #include "libmime/lang_detection.h" #include "mempool_vars_internal.h" +#include "lua/lua_classnames.h" #include <math.h> /* 60 seconds for worker's IO */ @@ -1555,7 +1556,7 @@ rspamd_controller_handle_lua_history(lua_State *L, ptask = lua_newuserdata(L, sizeof(*ptask)); *ptask = task; - rspamd_lua_setclass(L, "rspamd{task}", -1); + rspamd_lua_setclass(L, rspamd_task_classname, -1); pconn_ent = lua_newuserdata(L, sizeof(*pconn_ent)); *pconn_ent = conn_ent; rspamd_lua_setclass(L, "rspamd{csession}", -1); @@ -1916,7 +1917,7 @@ rspamd_controller_handle_lua(struct rspamd_http_connection_entry *conn_ent, } ptask = lua_newuserdata(L, sizeof(*ptask)); - rspamd_lua_setclass(L, "rspamd{task}", -1); + rspamd_lua_setclass(L, rspamd_task_classname, -1); *ptask = task; pconn = lua_newuserdata(L, sizeof(*pconn)); @@ -3541,7 +3542,7 @@ rspamd_controller_handle_lua_plugin(struct rspamd_http_connection_entry *conn_en /* Task */ ptask = lua_newuserdata(L, sizeof(*ptask)); - rspamd_lua_setclass(L, "rspamd{task}", -1); + rspamd_lua_setclass(L, rspamd_task_classname, -1); *ptask = task; /* Connection */ |