From: Vsevolod Stakhov Date: Mon, 17 Nov 2025 16:46:46 +0000 (+0000) Subject: [Minor] Migrate lua_meta.lua from tableshape to lua_shape X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=341dbe449af205d542d6fd49d5d5780f3783f317;p=thirdparty%2Frspamd.git [Minor] Migrate lua_meta.lua from tableshape to lua_shape Replace tableshape with lua_shape for metafunction schema: - Convert ts.shape to T.table - Convert ts.func to T.callable() - Convert ts.array_of to T.array - Convert :is_optional() to :optional() No functional changes, luacheck passes. --- diff --git a/lualib/lua_meta.lua b/lualib/lua_meta.lua index d969fd156d..5b2b701fa7 100644 --- a/lualib/lua_meta.lua +++ b/lualib/lua_meta.lua @@ -17,7 +17,7 @@ limitations under the License. local exports = {} local N = "metatokens" -local ts = require("tableshape").types +local T = require "lua_shape.core" local logger = require "rspamd_logger" local lua_mime = require "lua_mime" @@ -587,12 +587,12 @@ local metafunctions = { }, } -local meta_schema = ts.shape { - cb = ts.func, - ninputs = ts.number, - names = ts.array_of(ts.string), - description = ts.string:is_optional() -} +local meta_schema = T.table({ + cb = T.callable(), + ninputs = T.number(), + names = T.array(T.string()), + description = T.string():optional() +}) local metatokens_by_name = {}