iyi

Prelude, 0.18.0

Pointer

A raw address: Pointer(T).malloc(n) is n elements of untyped memory, [] and []= read and write them, nothing checks the bounds.

In the prelude: every iyi program has it, with no import.

Pointer(T)struct

Pointeriyi doc Pointer
struct Pointer(T) < Value

  def +(offset : Int64) : self

  def -(other : self) : Int64

  def [](offset : Int32) : T

  def []=(offset : Int32, value : T) : T

  def address : UInt64

  # Bytes, not elements: every caller here is copying string contents.
  def copy_from(source : Pointer(T), count : Int32) : Nil

  def new

  def realloc(size : UInt64) : self

  def value : T

  def value=(value : T)

  def self.malloc(size : UInt64)

  def self.new(address : UInt64)
end