Struct.type readonly



Gets the type of the Struct as a string.

Notes

  • This property returns the same result as the C.type() function.
  • If the Struct is a C Struct definition, the property returns the string "Struct<cdef>"

Example

local c = require "c" -- Defines a RECT Struct local RECT = c.Struct("iiii", "left", "top", "right", "bottom") -- Creates a new RECT local r = RECT() print("Type of RECT is "..RECT.type) print("Type of r is "..r.type)