diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-05 14:00:08 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-05 14:00:08 +0000 |
commit | 75327b3889c80ad0a0c95ccf4444b5c2bc148e14 (patch) | |
tree | d322e1dda625fed70ded03abe1a179134624bd8e /src/fuzzy_storage.c | |
parent | 72539a7ad17fb79ef68c39d728a5f706947e3441 (diff) | |
download | rspamd-75327b3889c80ad0a0c95ccf4444b5c2bc148e14.tar.gz rspamd-75327b3889c80ad0a0c95ccf4444b5c2bc148e14.zip |
[Project] Convert the remaining
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r-- | src/fuzzy_storage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index b4d2b802b..59a4b815b 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -2551,7 +2551,7 @@ static int lua_fuzzy_add_pre_handler(lua_State *L) { struct rspamd_worker *wrk, **pwrk = (struct rspamd_worker **) - rspamd_lua_check_udata(L, 1, "rspamd{worker}"); + rspamd_lua_check_udata(L, 1, rspamd_worker_classname); struct rspamd_fuzzy_storage_ctx *ctx; if (!pwrk) { @@ -2582,7 +2582,7 @@ static int lua_fuzzy_add_post_handler(lua_State *L) { struct rspamd_worker *wrk, **pwrk = (struct rspamd_worker **) - rspamd_lua_check_udata(L, 1, "rspamd{worker}"); + rspamd_lua_check_udata(L, 1, rspamd_worker_classname); struct rspamd_fuzzy_storage_ctx *ctx; if (!pwrk) { @@ -2613,7 +2613,7 @@ static int lua_fuzzy_add_blacklist_handler(lua_State *L) { struct rspamd_worker *wrk, **pwrk = (struct rspamd_worker **) - rspamd_lua_check_udata(L, 1, "rspamd{worker}"); + rspamd_lua_check_udata(L, 1, rspamd_worker_classname); struct rspamd_fuzzy_storage_ctx *ctx; if (!pwrk) { @@ -3458,17 +3458,17 @@ start_fuzzy(struct rspamd_worker *worker) .name = "add_fuzzy_pre_handler", .func = lua_fuzzy_add_pre_handler, }; - rspamd_lua_add_metamethod(ctx->cfg->lua_state, "rspamd{worker}", &fuzzy_lua_reg); + rspamd_lua_add_metamethod(ctx->cfg->lua_state, rspamd_worker_classname, &fuzzy_lua_reg); fuzzy_lua_reg = (luaL_Reg){ .name = "add_fuzzy_post_handler", .func = lua_fuzzy_add_post_handler, }; - rspamd_lua_add_metamethod(ctx->cfg->lua_state, "rspamd{worker}", &fuzzy_lua_reg); + rspamd_lua_add_metamethod(ctx->cfg->lua_state, rspamd_worker_classname, &fuzzy_lua_reg); fuzzy_lua_reg = (luaL_Reg){ .name = "add_fuzzy_blacklist_handler", .func = lua_fuzzy_add_blacklist_handler, }; - rspamd_lua_add_metamethod(ctx->cfg->lua_state, "rspamd{worker}", &fuzzy_lua_reg); + rspamd_lua_add_metamethod(ctx->cfg->lua_state, rspamd_worker_classname, &fuzzy_lua_reg); rspamd_lua_run_postloads(ctx->cfg->lua_state, ctx->cfg, ctx->event_loop, worker); |