Pointer.isnull readonly



The Pointer.isnull property checks if the Pointer is NULL, returning true in this case or false otherwise.

Example

local crt = c.Library() -- Use the Library instance to define the C function "strstr()" -- this function takes two arguments of the Z type (const char *) -- and returns a char* value crt.strstr = "(ZZ)p" -- Calls the just defined C function, returning a C Pointer local result = crt.strstr("Hello LuaRT", "tea") if result.isnull then print("The word 'tea' cannot be found in 'Hello LuaRT' string") end