X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fident%2Fident.c;h=8a23dfae629b54f13b77f765ea5bd0f9d08e36d8;hb=b9a1bfdbce56c76bd4d5ff772963628523ecfc41;hp=4633ebd6ec031fa7574e95e5db851878947cb675;hpb=b2d1648a97fb43656495fd1cc25aa3f8e98ec769;p=libfirm diff --git a/ir/ident/ident.c b/ir/ident/ident.c index 4633ebd6e..8a23dfae6 100644 --- a/ir/ident/ident.c +++ b/ir/ident/ident.c @@ -21,7 +21,6 @@ * @file * @brief Hash table to store names. * @author Goetz Lindenmaier - * @version $Id$ */ #include "config.h" @@ -47,7 +46,7 @@ void init_ident(void) ident *new_id_from_chars(const char *str, size_t len) { - unsigned hash = HASH_STR(str, len); + unsigned hash = hash_data((const unsigned char*)str, len); ident *result = (ident*) set_hinsert0(id_set, str, len, hash); return result; } @@ -81,7 +80,7 @@ int id_is_prefix(ident *prefix, ident *id) size_t prefix_len = get_id_strlen(prefix); if (prefix_len > get_id_strlen(id)) return 0; - return 0 == memcmp(get_id_str(prefix), get_id_str(id), prefix_len); + return 0 == memcmp(get_id_str(prefix), get_id_str(id), prefix_len); } int id_is_suffix(ident *suffix, ident *id)