projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d373fb
)
Revert "[Utils] Use g_direct_equal if NULL is passed in as the equals function"
author
Vlad Brezae
<brezaevlad@gmail.com>
Fri, 17 Feb 2017 17:34:56 +0000
(19:34 +0200)
committer
Vlad Brezae
<brezaevlad@gmail.com>
Mon, 20 Feb 2017 12:24:26 +0000
(14:24 +0200)
This reverts commit
914ecbcfec62bfc34984b3e121456d3f476a4707
.
Having equal_func NULL is an optimization to avoid unnecessary calls.
mono/utils/mono-conc-hashtable.c
patch
|
blob
|
history
diff --git
a/mono/utils/mono-conc-hashtable.c
b/mono/utils/mono-conc-hashtable.c
index 9b92493191ed1a08bad915c7ab7df8ecd6a5fcb5..9f5fd6addb19608c19acb1a7549eecf7000af369 100644
(file)
--- a/
mono/utils/mono-conc-hashtable.c
+++ b/
mono/utils/mono-conc-hashtable.c
@@
-114,7
+114,7
@@
mono_conc_hashtable_new (GHashFunc hash_func, GEqualFunc key_equal_func)
{
MonoConcurrentHashTable *res = g_new0 (MonoConcurrentHashTable, 1);
res->hash_func = hash_func ? hash_func : g_direct_hash;
- res->equal_func = key_equal_func
? key_equal_func : g_direct_equal
;
+ res->equal_func = key_equal_func;
// res->equal_func = g_direct_equal;
res->table = conc_table_new (INITIAL_SIZE);
res->element_count = 0;