projects
/
rrq
/
rrqmisc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initial test
[rrq/rrqmisc.git]
/
tests
/
example-hashvector.c
diff --git
a/tests/example-hashvector.c
b/tests/example-hashvector.c
index 516cd07393cc8e790e6b872a32453e767e18e7b2..8fe73b6ad4f53397bf95e30427fec2f2bbe73ccd 100644
(file)
--- a/
tests/example-hashvector.c
+++ b/
tests/example-hashvector.c
@@
-20,6
+20,9
@@
static int voidp_haskey(itemkeyfun *this,void *item,void *key) {
return memcmp( item, key, sizeof( ipslot ) ) == 0;
}
return memcmp( item, key, sizeof( ipslot ) ) == 0;
}
+static void voidp_releasekey(itemkeyfun *this,void *key) {
+}
+
static int shrink(vector *pv,unsigned long index,void *item,void *data) {
if ( item ) {
if ( item == HV_HOLE ) {
static int shrink(vector *pv,unsigned long index,void *item,void *data) {
if ( item ) {
if ( item == HV_HOLE ) {
@@
-36,10
+39,11
@@
int main(int argc,char **argv) {
itemkeyfun voidpfun = {
.hashcode = voidp_hashcode,
.itemkey = voidp_itemkey,
itemkeyfun voidpfun = {
.hashcode = voidp_hashcode,
.itemkey = voidp_itemkey,
- .haskey = voidp_haskey
+ .haskey = voidp_haskey,
+ .releasekey = voidp_releasekey
};
hashvector hv = {
};
hashvector hv = {
- .table = { 4, 0 },
+ .table = {
1,
4, 0 },
.fill = 0,
.holes = 0,
.type = &voidpfun
.fill = 0,
.holes = 0,
.type = &voidpfun