aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstat/backends')
-rw-r--r--src/libstat/backends/redis_backend.cxx4
-rw-r--r--src/libstat/backends/sqlite3_backend.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libstat/backends/redis_backend.cxx b/src/libstat/backends/redis_backend.cxx
index 14e821029..630c895a2 100644
--- a/src/libstat/backends/redis_backend.cxx
+++ b/src/libstat/backends/redis_backend.cxx
@@ -218,7 +218,7 @@ gsize rspamd_redis_expand_object(const gchar *pattern,
lua_rawgeti(L, LUA_REGISTRYINDEX, ctx->cbref_user);
ptask = (struct rspamd_task **) 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, 1, err_idx) != 0) {
msg_err_task("call to user extraction script failed: %s",
@@ -547,7 +547,7 @@ rspamd_redis_init(struct rspamd_stat_ctx *ctx,
if (ctx->event_loop) {
auto **pev_base = (struct ev_loop **) lua_newuserdata(L, sizeof(struct ev_loop *));
*pev_base = ctx->event_loop;
- rspamd_lua_setclass(L, "rspamd{ev_base}", -1);
+ rspamd_lua_setclass(L, rspamd_ev_base_classname, -1);
}
else {
lua_pushnil(L);
diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c
index 2fd34d83f..68b52128f 100644
--- a/src/libstat/backends/sqlite3_backend.c
+++ b/src/libstat/backends/sqlite3_backend.c
@@ -1,11 +1,11 @@
-/*-
- * Copyright 2016 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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -177,7 +177,7 @@ rspamd_sqlite3_get_user(struct rspamd_stat_sqlite3_db *db,
lua_rawgeti(L, LUA_REGISTRYINDEX, db->cbref_user);
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, 1, err_idx) != 0) {
msg_err_task("call to user extraction script failed: %s",
@@ -246,7 +246,7 @@ rspamd_sqlite3_get_language(struct rspamd_stat_sqlite3_db *db,
lua_rawgeti(L, LUA_REGISTRYINDEX, db->cbref_language);
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, 1, err_idx) != 0) {
msg_err_task("call to language extraction script failed: %s",