class ffi.Pointer

Available on all platforms

Represents a pointer

Instance Fields

function new(bytes:Int):Void

Allocate the number of bytes given.

bytes

The number of bytes to allocate for.

function fromString(text:String):Pointer

Allocate a pointer for the string given.

text

The string to allocate for.

returns

The pointer allocated.

function get(type:Type, ?offset:Int):Dynamic

Get this pointer as a certain type at the offset given.

type

The type to get the pointer as.

offset

The offset to add to this pointer.

returns

The content of this pointer.

function getAsNekoValue():Dynamic

Get this pointer to a neko value as a neko value.

returns

The value.

function getBytes(length:Int):BytesData

Get this pointer as a bytes with the length specified.

length

The length of the bytes to get.

returns

The bytes.

function getString():String

Get the string stored at this pointer's location.

returns

The string stored.

function setBytes(bytes:BytesData):Void

Writes to this pointer with the bytes given.

bytes

The bytes to set.