4 #include <itemkeyfun.h>
7 * The stringitem record declares the itemkeyfun functions for string
10 extern itemkeyfun stringitem;
13 * This callback function returns the hashcode of a key. The hashcode
14 * is used for indexing into the backing vector for finding the an
15 * item via its key. The same key must map consistently to the same
16 * hashcode while the hashtable contains an item with that key.
17 * Different keys map map to the same hashcode, in which case the
18 * vector placement is made at the first empty or hole slot following
21 extern unsigned long stringitem_hashcode(itemkeyfun *this,void *key);
24 * This callback function determines whether an item has a
27 extern int stringitem_haskey(itemkeyfun *this,void *item,void *key);
30 * This callback function returns the key of an item by considering
31 * the arity and schema.
33 extern void *stringitem_itemkey(itemkeyfun *this,void *item);
36 * This callback function handles a key obtained from the itemkey
37 * callback function to reclaim temporary allocation.
39 extern void stringitem_releasekey(itemkeyfun *this,void *key);