projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix off-by-one error in error message.
[cparser]
/
type_hash.c
diff --git
a/type_hash.c
b/type_hash.c
index
9eddefe
..
046e6af
100644
(file)
--- a/
type_hash.c
+++ b/
type_hash.c
@@
-98,7
+98,7
@@
static unsigned hash_function_type(const function_type_t *type)
result ^= hash_ptr(parameter->type);
parameter = parameter->next;
}
result ^= hash_ptr(parameter->type);
parameter = parameter->next;
}
- result
^= hash_ptr(type->linkage)
;
+ result
+= type->linkage
;
result += type->calling_convention;
return result;
result += type->calling_convention;
return result;
@@
-231,7
+231,8
@@
static bool function_types_equal(const function_type_t *type1,
static bool pointer_types_equal(const pointer_type_t *type1,
const pointer_type_t *type2)
{
static bool pointer_types_equal(const pointer_type_t *type1,
const pointer_type_t *type2)
{
- return type1->points_to == type2->points_to;
+ return type1->points_to == type2->points_to &&
+ type1->base_variable == type2->base_variable;
}
static bool array_types_equal(const array_type_t *type1,
}
static bool array_types_equal(const array_type_t *type1,