hash.l0
Module: sys.hash
Source: compiler/shared/l0/stdlib/sys/hash.l0 Language: Dea/L0
Symbols
- rt_hash_bool
- rt_hash_byte
- rt_hash_int
- rt_hash_string
- rt_hash_data
- rt_hash_opt_bool
- rt_hash_opt_byte
- rt_hash_opt_int
- rt_hash_opt_string
- rt_hash_ptr
- rt_hash_opt_ptr
Function rt_hash_bool
1
extern func rt_hash_bool(value: bool) -> int
Hash a boolean value.
Parameters:
value: The boolean to hash.
Returns: The hash code.
Function rt_hash_byte
1
extern func rt_hash_byte(value: byte) -> int
Hash a byte value.
Parameters:
value: The byte to hash.
Returns: The hash code.
Function rt_hash_int
1
extern func rt_hash_int(value: int) -> int
Hash an integer value.
Parameters:
value: The integer to hash.
Returns: The hash code.
Function rt_hash_string
1
extern func rt_hash_string(value: string) -> int
Hash a string value.
Parameters:
value: The string to hash.
Returns: The hash code.
Function rt_hash_data
1
extern func rt_hash_data(data: void*, size: int) -> int
Hash raw data given a pointer and its length.
Parameters:
data: The pointer to the data.size: The size of the data in bytes.
Returns: The hash code.
Function rt_hash_opt_bool
1
extern func rt_hash_opt_bool(opt: bool?) -> int
Hash an optional boolean value.
Parameters:
opt: The optional boolean to hash.
Returns: The hash code.
Function rt_hash_opt_byte
1
extern func rt_hash_opt_byte(opt: byte?) -> int
Hash an optional byte value.
Parameters:
opt: The optional byte to hash.
Returns: The hash code.
Function rt_hash_opt_int
1
extern func rt_hash_opt_int(opt: int?) -> int
Hash an optional integer value.
Parameters:
opt: The optional integer to hash.
Returns: The hash code.
Function rt_hash_opt_string
1
extern func rt_hash_opt_string(opt: string?) -> int
Hash an optional string value.
Parameters:
opt: The optional string to hash.
Returns: The hash code.
Function rt_hash_ptr
1
extern func rt_hash_ptr(ptr: void*) -> int
Hash a pointer value.
Note: this hashes the pointer address, not the data it points to.
Parameters:
ptr: The pointer to hash.
Returns: The hash code.
Function rt_hash_opt_ptr
1
extern func rt_hash_opt_ptr(opt: void*?) -> int
Hash an optional pointer value.
Note: this hashes the pointer address, not the data it points to. Panics if the optional is empty.
Parameters:
opt: The optional pointer to hash.
Returns: The hash code.