Skip to content

sonolus.script.values

alloc(type_)

Return an uninitialized instance of the given type.

Use this carefully as reading from uninitialized memory can lead to unexpected behavior.

copy(value)

Make a deep copy of the given value.

Generally works the same as the unary + operator on records and arrays.

sizeof(type_)

Return the size of the given type.

swap(a, b)

Swap the values of the two provided mutable values.

zeros(type_)

Make a new instance of the given type initialized with zeros.

Generally works the same as the unary + operator on record and array types.