From: Ralph Ronnquist Date: Fri, 8 Jul 2022 01:12:20 +0000 (+1000) Subject: Change "this" to be void pointer so as to avoid spurious struct names X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=e7cfb732dbf345432b0832c32b99b17a1741b206;p=rrq%2Frrqmisc.git Change "this" to be void pointer so as to avoid spurious struct names --- diff --git a/vector/integeritem.c b/vector/integeritem.c index 0ad2302..6e6ac04 100644 --- a/vector/integeritem.c +++ b/vector/integeritem.c @@ -9,7 +9,7 @@ * vector placement is made at the first empty or hole slot following * the hashcode index. */ -static unsigned long integeritem_hashcode(itemkeyfun *this,void *key) { +static unsigned long integeritem_hashcode(void *this,void *key) { return (unsigned long) key; } @@ -17,7 +17,7 @@ static unsigned long integeritem_hashcode(itemkeyfun *this,void *key) { * This callback function determines whether an item has a * given key or not. */ -static int integeritem_haskey(itemkeyfun *this,void *item,void *key) { +static int integeritem_haskey(void *this,void *item,void *key) { return item == key; } @@ -25,7 +25,7 @@ static int integeritem_haskey(itemkeyfun *this,void *item,void *key) { * This callback function returns the key of an item by considering * the arity and schema. */ -static void *integeritem_itemkey(itemkeyfun *this,void *item) { +static void *integeritem_itemkey(void *this,void *item) { return item; } @@ -33,7 +33,7 @@ static void *integeritem_itemkey(itemkeyfun *this,void *item) { * This callback function handles a key obtained from the itemkey * callback function to reclaim temporary allocation. */ -static void integeritem_releasekey(itemkeyfun *this,void *key) { +static void integeritem_releasekey(void *this,void *key) { } itemkeyfun integeritem = { diff --git a/vector/stringitem.c b/vector/stringitem.c index ce10e7c..db400ce 100644 --- a/vector/stringitem.c +++ b/vector/stringitem.c @@ -11,7 +11,7 @@ * vector placement is made at the first empty or hole slot following * the hashcode index. */ -static unsigned long stringitem_hashcode(itemkeyfun *this,void *key) { +static unsigned long stringitem_hashcode(void *this,void *key) { return hashvector_hashcode( (unsigned char*)key, strlen( (char*)key ) ); } @@ -19,7 +19,7 @@ static unsigned long stringitem_hashcode(itemkeyfun *this,void *key) { * This callback function determines whether an item has a * given key or not. */ -static int stringitem_haskey(itemkeyfun *this,void *item,void *key) { +static int stringitem_haskey(void *this,void *item,void *key) { return strcmp( item, key ) == 0; } @@ -27,7 +27,7 @@ static int stringitem_haskey(itemkeyfun *this,void *item,void *key) { * This callback function returns the key of an item by considering * the arity and schema. */ -static void *stringitem_itemkey(itemkeyfun *this,void *item) { +static void *stringitem_itemkey(void *this,void *item) { return item; } @@ -35,7 +35,7 @@ static void *stringitem_itemkey(itemkeyfun *this,void *item) { * This callback function handles a key obtained from the itemkey * callback function to reclaim temporary allocation. */ -static void stringitem_releasekey(itemkeyfun *this,void *key) { +static void stringitem_releasekey(void *this,void *key) { } itemkeyfun stringitem = { diff --git a/vector/tupleitem.c b/vector/tupleitem.c index 99539be..c63e3ec 100644 --- a/vector/tupleitem.c +++ b/vector/tupleitem.c @@ -22,7 +22,7 @@ * vector placement is made at the first empty or hole slot following * the hashcode index. */ -static unsigned long tupleitem_hashcode(itemkeyfun *this,void *key) { +static unsigned long tupleitem_hashcode(void *this,void *key) { tupleschema *def = (tupleschema *) this; tuple *kp = (tuple*) key; int i = 0; @@ -40,7 +40,7 @@ static unsigned long tupleitem_hashcode(itemkeyfun *this,void *key) { * This callback function determines whether an item has a * given key or not. */ -static int tupleitem_haskey(itemkeyfun *this,void *item,void *key) { +static int tupleitem_haskey(void *this,void *item,void *key) { tupleschema *def = (tupleschema *) this; tuple *kp = (tuple*) key; tuple *tp = (tuple*) item; @@ -65,7 +65,7 @@ static int tupleitem_haskey(itemkeyfun *this,void *item,void *key) { * This callback function returns the key of an item by considering * the arity and mask. */ -static void *tupleitem_itemkey(itemkeyfun *this,void *item) { +static void *tupleitem_itemkey(void *this,void *item) { tupleschema *def = (tupleschema *) this; tuple *tp = (tuple*) item; int i, j; @@ -88,7 +88,7 @@ static void *tupleitem_itemkey(itemkeyfun *this,void *item) { * This callback function handles a key obtained from the itemkey * callback function to reclaim temporary allocation. */ -static void tupleitem_releasekey(itemkeyfun *this,void *key) { +static void tupleitem_releasekey(void *this,void *key) { tupleschema *def = (tupleschema *) this; tuple *kp = (tuple*) key; int i,j;