added bytearray view wrapper for float (float32)

This commit is contained in:
RomanDonw 2026-07-22 20:36:01 +10:00
parent 5284d4acaa
commit 29f5373d81
2 changed files with 3 additions and 0 deletions

View file

@ -305,6 +305,7 @@ local FFII16view = create_FFIview_class("FFII16view", "int16_t", 2)
local FFIU16view = create_FFIview_class("FFIU16view", "uint16_t", 2)
local FFII32view = create_FFIview_class("FFII32view", "int32_t", 4)
local FFIU32view = create_FFIview_class("FFIU32view", "uint32_t", 4)
local FFIF32view = create_FFIview_class("FFIF32view", "float", 4)
return {
FFIBytearray = setmetatable(FFIBytearray, FFIBytearray),
@ -314,4 +315,5 @@ return {
FFII16view = FFII16view,
FFIU32view = FFIU32view,
FFII32view = FFII32view,
FFIF32view = FFIF32view,
}

View file

@ -314,6 +314,7 @@ U16view = bytearray.FFIU16view
I16view = bytearray.FFII16view
U32view = bytearray.FFIU32view
I32view = bytearray.FFII32view
F32view = bytearray.FFIF32view
Bytearray_construct = function(...) return Bytearray(...) end
bit.compile = require "core:bitwise/compiler"