mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix view classes static typesize method
This commit is contained in:
parent
c757f72277
commit
7f04d2884e
1 changed files with 13 additions and 9 deletions
|
|
@ -340,16 +340,20 @@ local function create_FFIview_class(name, typename)
|
|||
end
|
||||
end
|
||||
end,
|
||||
typesize = function()
|
||||
return typesize
|
||||
end
|
||||
}
|
||||
return function (bytes)
|
||||
local x = setmetatable({
|
||||
bytes=bytes,
|
||||
}, FFIview_mt)
|
||||
return x
|
||||
end
|
||||
return setmetatable({}, {
|
||||
__call = function (self, bytes)
|
||||
local x = setmetatable({
|
||||
bytes=bytes,
|
||||
}, FFIview_mt)
|
||||
return x
|
||||
end,
|
||||
__index = {
|
||||
typesize = function()
|
||||
return typesize
|
||||
end
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
local FFII8view = create_FFIview_class("FFII8view", "int8_t")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue