Skip to content
Snippets Groups Projects
Commit 435671e9 authored by Bruce Cowan's avatar Bruce Cowan
Browse files

Make function pointer typedefs more generic

parent b64019e4
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ struct _HashTable
SList **array;
HashFunc hash_func;
HashEqualFunc equal_func;
EqualFunc equal_func;
FreeFunc free_key_func;
FreeFunc free_value_func;
};
......@@ -65,10 +65,10 @@ key_value_free (KeyValue *kv,
* Creates a new #HashTable.
*/
HashTable *
hash_table_new (HashFunc hash_func,
HashEqualFunc equal_func,
FreeFunc free_key_func,
FreeFunc free_value_func)
hash_table_new (HashFunc hash_func,
EqualFunc equal_func,
FreeFunc free_key_func,
FreeFunc free_value_func)
{
HashTable *new = check_malloc (sizeof (HashTable));
......
......@@ -7,7 +7,7 @@ typedef struct _HashTable HashTable;
HashTable * hash_table_new (HashFunc hash_func,
HashEqualFunc equal_func,
EqualFunc equal_func,
FreeFunc free_key_func,
FreeFunc free_value_func);
void hash_table_free (HashTable *self);
......
......@@ -8,10 +8,10 @@ typedef void (*ForEachFunc) (void *data,
typedef double (*ValueFunc) (const void *element);
typedef int (*CompareFunc) (const void *a,
const void *b);
typedef bool (*EqualFunc) (const void *a,
const void *b);
typedef unsigned (*HashFunc) (const void *key);
typedef bool (*HashEqualFunc) (const void *a,
const void *b);
typedef void (*HashIterFunc) (void *key,
void *value,
void *user_data);
typedef unsigned (*HashFunc) (const void *key);
typedef void (*HashIterFunc) (void *key,
void *value,
void *user_data);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment