libpulsar
A modular compiler for the pulsar programming language
Loading...
Searching...
No Matches
hash.h
Go to the documentation of this file.
1
8#pragma once
9#include "def.h"
10
12typedef u64 hash_t;
13
15typedef u64 (*hasher_t)(void*);
16
18typedef bool (*is_equal_t)(void*, void*);
19
25
32bool ps_str_is_equal(STR a, STR b);
Base definitions.
#define STR
Definition def.h:40
#define u64
Definition def.h:48
u64(* hasher_t)(void *)
Function that hashes an object.
Definition hash.h:15
bool(* is_equal_t)(void *, void *)
Function that compares whether two objects are equal.
Definition hash.h:18
bool ps_str_is_equal(STR a, STR b)
Compares the given strings.
Definition hash.c:21
u64 hash_t
Numeric type for hashes.
Definition hash.h:12
hash_t ps_str_hash(STR str)
Hashes the given string according to the FNV-1a algorithm.
Definition hash.c:12