C.type(object)
Gets the type of the provided C object.
object
A C object instance to get the type from, which can be any of the following :
Return value
Returns the type of the C object as astring
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 array elements type
print(c.type(CharArray))