1 #import <ObjFW/ObjFW.h>
4 static void *copy(void *value)
6 return [(id)value copy];
9 static void release(void *value)
14 static uint32_t hash(void *value)
16 return [(id)value hash];
19 static BOOL equal(void *value1, void *value2)
21 return [(id)value1 isEqual: (id)value2];
24 static void *g_retain(void *value)
26 return g_object_ref(value);
29 static void g_release(void *value)
31 g_object_unref(value);
34 static void *default_retain(void *value)
39 static uint32_t default_hash(void *value)
41 #define NUM (sizeof(void*)/sizeof(uint32_t))
49 for (i = 0; i < NUM; i++)
56 static BOOL default_equal(void *value1, void *value2)
58 return (value1 == value2);
62 static void rowref_release(void *value)
64 gtk_tree_row_reference_free(value);
67 static of_map_table_functions_t keyFunctions = {
74 static of_map_table_functions_t gObjectFunctions __attribute__((unused)) = {
78 .equal = default_equal
81 static of_map_table_functions_t rowRefFunctions = {
82 .retain = default_retain,
83 .release = rowref_release,
85 .equal = default_equal