@@@ tvec error return
[mLib] / struct / hash.3
index 5869d89..19522ee 100644 (file)
@@ -38,11 +38,24 @@ hash \- low-level hashtable implementation
 .nf
 .B "#include <mLib/hash.h>"
 
+.B "typedef struct {"
+.B "\h'4n'uint32 mask;"
+.B "\h'4n'hash_base **v;"
+.B "\h'4n'arena *a;"
+.B "} hash_table;"
+
+.B "typedef struct {"
+.B "\h'4n'hash_base *next;"
+.B "\h'4n'uint32 hash;"
+.B "} hash_base;"
+
+.B "typedef struct { ...\& } hash_iter;"
+
 .BI "void hash_create(hash_table *" t ", size_t " n );
 .BI "void hash_destroy(hash_table *" t );
 .BI "hash_base **hash_bin(hash_table *" t ", uint32 " hash );
 .BI "int hash_extend(hash_table *" t );
-.BI "void hash_remove(hash_table *" t ", hash_base * " b );
+.BI "void hash_remove(hash_table *" t ", hash_base *" b );
 .BI "void hash_mkiter(hash_iter *" i ", hash_table *" t );
 .BI "hash_base *hash_next(hash_iter *" i );