Union.size readonly



Gets the current C Union size in memory, in bytes.

Example

local c = require "c" -- Creates a LARGE_INTEGER C union definition from Windows API, with a struct field local LARGE_INTEGER = c.Union(".l", { Part = c.Struct("Ii", "Low", "High") }, "QuadPart") -- prints 'true' print(LARGE_INTEGER.size == #LARGE_INTEGER)