newtypedefs generation3

This commit is contained in:
sonoro1234
2022-01-29 12:22:39 +01:00
parent a51a8f7a86
commit b5f5a03851
2 changed files with 32 additions and 27 deletions

View File

@@ -270,8 +270,9 @@ local function gentemplatetypedef(self,ttype,te,newte)
elseif ttype == "ImSpan" then
table.insert(code,"typedef struct ImSpan_"..newte.." {"..te.."* Data;" ..te.."* DataEnd;} ImSpan_"..newte..";\n")
elseif ttype == "ImBitArray" then
local args = {te}
if te:match"," then
local args = cpp2ffi.strsplit(te,",")
args = cpp2ffi.strsplit(te,",")
end
table.insert(code,"typedef struct ImBitArray_"..newte.." {ImU32 Storage[("..args[1].." + 31) >> 5];" .."} ImBitArray_"..newte..";\n")
else