Array.size readonly



Gets the C Array size in memory, in bytes.

Example

local c = require 'c' -- Defines a C array with 3 rows of 4 chars local CharArray = c.Array("c", 3, 4) -- Creates a new CharArray with an initialization table local array = CharArray { { "a", "b", "c", '\0' }, { "d", "e", "f", '\0' }, { "g", "h", "i", '\0' } } -- prints the size of "array" in memory (3x4 elements of 1 bytes) print(array.size)