unsigned int bits;
} ipslot;
-static unsigned long voidp_hashcode(itemkeyfun *this,void *key) {
+static unsigned long voidp_hashcode(void *this,void *key) {
return hashvector_hashcode( key, sizeof( ipslot ) );
}
-static void* voidp_itemkey(itemkeyfun *this,void *item) {
+static void* voidp_itemkey(void *this,void *item) {
return item;
}
-static int voidp_haskey(itemkeyfun *this,void *item,void *key) {
+static int voidp_haskey(void *this,void *item,void *key) {
return memcmp( item, key, sizeof( ipslot ) ) == 0;
}
-static void voidp_releasekey(itemkeyfun *this,void *key) {
+static void voidp_releasekey(void *this,void *key) {
+}
+
+static int voidp_tostring(void *this, void *item, char *buffer, int limit) {
+ return snprintf( buffer, limit, "%p", item );
}
static int shrink(vector *pv,unsigned long index,void *item,void *data) {
.hashcode = voidp_hashcode,
.itemkey = voidp_itemkey,
.haskey = voidp_haskey,
- .releasekey = voidp_releasekey
+ .releasekey = voidp_releasekey,
+ .tostring = voidp_tostring
};
hashvector hv = {
.table = { 1, 4, 0 },