mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 14:31:50 +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
|
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")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue