remove copy allocator, since it is not needed
This commit is contained in:
parent
5970eae220
commit
ee37ac4da9
@ -22,8 +22,6 @@ typedef struct entry * hashtable_iterator_t;
|
||||
|
||||
// data deallocator
|
||||
typedef void(*hashtable_dealloc)(void*);
|
||||
// data copy and allocator
|
||||
typedef void(*hashtable_alloc)(void*);
|
||||
|
||||
extern int key_compare(entry_key_t one, entry_key_t two);
|
||||
extern entry_hash_t key_hash(entry_key_t key);
|
||||
@ -38,10 +36,11 @@ struct hashtable {
|
||||
struct entry * data;
|
||||
size_t len, count;
|
||||
|
||||
hashtable_alloc alloc_data;
|
||||
hashtable_dealloc dealloc_data;
|
||||
};
|
||||
|
||||
extern void hashtable_init(struct hashtable * table);
|
||||
|
||||
extern hashtable_iterator_t hashtable_end(struct hashtable * table);
|
||||
|
||||
/**
|
||||
|
@ -42,6 +42,13 @@ void testadd() {
|
||||
pass();
|
||||
}
|
||||
|
||||
volatile int number_copied = 0;
|
||||
|
||||
void* test_copy(void * data) {
|
||||
number_copied++;
|
||||
return data;
|
||||
}
|
||||
|
||||
void testget() {
|
||||
init("get");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user