Pointer.content readwrite



The Pointer.content property access the memory content of the pointed memory, as a Value

Notes

Example

--! luart-extensions import c -- Create a C integer Value, that contains the number 10 local int = c.int(10) -- Creates a Pointer to this Value local int_ptr = c.Pointer(int) -- Gets the content of the pointed memory to a new integer Value local derefer = int_ptr.content -- Changes the pointed memory content to 20 instead of 10 int_ptr.content = 20 -- int Value now contains 20 (defer Value is still 10) print("int =", int) print("derefer =", derefer)