X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftype_identify.c;h=bdd11278f7a33ff6deb570968b2b3185c8eaddf6;hb=98ca7e71bc79bb2a3b2ccb039df78000fc48e70a;hp=499fcec5acab7b9321447be543803e9ec8a449a0;hpb=0fd85ad47f0a067420f2802235fb21e47a746369;p=libfirm diff --git a/ir/tr/type_identify.c b/ir/tr/type_identify.c index 499fcec5a..bdd11278f 100644 --- a/ir/tr/type_identify.c +++ b/ir/tr/type_identify.c @@ -19,7 +19,7 @@ */ #ifdef HAVE_CONFIG_H -# include +# include "config.h" #endif #include "type_identify_t.h" @@ -61,7 +61,7 @@ int compare_strict (const void *tp1, const void *tp2) { } /* stuff to compute a hash value for a type. */ -int hash_name (type *tp) { +int firm_hash_name (type *tp) { unsigned h = (unsigned)tp->type_op; h = 9*h + (unsigned)tp->name; return h; @@ -116,9 +116,9 @@ type *mature_type_free_entities(type *tp) { } /* initialize this module */ -void init_type_identify(compare_types_func_t *cmp, hash_types_func_t *hash) { - compare_types_func = cmp ? cmp : compare_strict; - hash_types_func = hash ? hash : hash_name; +void init_type_identify(type_identify_if_t *ti_if) { + compare_types_func = ti_if && ti_if->cmp ? ti_if->cmp : compare_strict; + hash_types_func = ti_if && ti_if->hash ? ti_if->hash : firm_hash_name; type_table = new_pset (compare_types_func, 8); }