No matching definitions.

tur/safe

stdlib/safe.tur

bounds-checked operations returning Option or Result.

Drop-in replacements for unsafe operations that panic on failure.

Since: Phase U4

defn

array-get

(array-get [arr : ptr<void> idx : int] : ptr)
defn

array-set

(array-set [arr : ptr<void> idx : int value : int] : int)
defn

array-slice

(array-slice [arr : ptr<void> start : int len : int] : ptr)
defn

with-c-string

(with-c-string [s : cstr f : ptr] : ptr)
defn

from-c-string

(from-c-string [s : cstr] : cstr)
defn

box

(box [v : int] : ptr)
defn

unbox

(unbox [p : ptr] : int)