fix view classes static typesize method

This commit is contained in:
MihailRis 2026-08-04 18:54:37 +03:00
parent c757f72277
commit 7f04d2884e

View file

@ -340,16 +340,20 @@ local function create_FFIview_class(name, typename)
end end
end end
end, end,
typesize = function()
return typesize
end
} }
return function (bytes) return setmetatable({}, {
local x = setmetatable({ __call = function (self, bytes)
bytes=bytes, local x = setmetatable({
}, FFIview_mt) bytes=bytes,
return x }, FFIview_mt)
end return x
end,
__index = {
typesize = function()
return typesize
end
}
})
end end
local FFII8view = create_FFIview_class("FFII8view", "int8_t") local FFII8view = create_FFIview_class("FFII8view", "int8_t")