* the hashcode index.
*/
static unsigned long integeritem_hashcode(void *this,void *key) {
+ (void)this;
return (unsigned long) key;
}
* given key or not.
*/
static int integeritem_haskey(void *this,void *item,void *key) {
+ (void)this;
return item == key;
}
* the arity and schema.
*/
static void *integeritem_itemkey(void *this,void *item) {
+ (void)this;
return item;
}
* callback function to reclaim temporary allocation.
*/
static void integeritem_releasekey(void *this,void *key) {
+ (void)this; (void)key;
}
/**
* a character buffer.
*/
static int integeritem_tostring(void *this,void *item,char *buffer,int limit) {
+ (void)this;
return snprintf( buffer, limit, "%lld", (long long) item );
}
* the hashcode index.
*/
static unsigned long stringitem_hashcode(void *this,void *key) {
+ (void)this;
return HashVector_hashcode( (unsigned char*)key, strlen( (char*)key ) );
}
* given key or not.
*/
static int stringitem_haskey(void *this,void *item,void *key) {
+ (void)this;
return strcmp( item, key ) == 0;
}
* the arity and schema.
*/
static void *stringitem_itemkey(void *this,void *item) {
+ (void)this;
return item;
}
* callback function to reclaim temporary allocation.
*/
static void stringitem_releasekey(void *this,void *key) {
+ (void)this; (void)key;
}
/**
* a character buffer.
*/
static int stringitem_tostring(void *this,void *item,char *buffer,int limit) {
+ (void)this;
if ( item ) {
return snprintf( buffer, limit, "\"%s\"", (char*) item );
}
}
static int capture_item(Vector *pv,unsigned long ix,void *item,void *data) {
+ (void)pv; (void)ix;
if ( item && item != HV_HOLE ) {
HashVector_add( (HashVector *) data, item );
}
}
static int iter_item(unsigned long ix,void *item,void *data) {
+ (void)ix;
if ( item && item != HV_HOLE ) {
HashVector_add( (HashVector *) data, item );
}