dovecot-2.2: Previous "duplicate const" fix accidentally deleted...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Sun Feb 24 08:57:47 EET 2013
    
    
  
details:   http://hg.dovecot.org/dovecot-2.2/rev/ecd923186510
changeset: 15902:ecd923186510
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Feb 24 08:54:58 2013 +0200
description:
Previous "duplicate const" fix accidentally deleted some checking code instead of fixing it.
diffstat:
 src/lib/hash.h |  10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r 871154fc93f2 -r ecd923186510 src/lib/hash.h
--- a/src/lib/hash.h	Sun Feb 24 08:46:28 2013 +0200
+++ b/src/lib/hash.h	Sun Feb 24 08:54:58 2013 +0200
@@ -27,6 +27,16 @@
 	({(void)COMPILE_ERROR_IF_TRUE( \
 		sizeof((*table)._key) != sizeof(void *) || \
 		sizeof((*table)._value) != sizeof(void *)); \
+	(void)COMPILE_ERROR_IF_TRUE( \
+		!__builtin_types_compatible_p(typeof(&key_cmp_cb), \
+			int (*)(typeof((*table)._key), typeof((*table)._key))) && \
+		!__builtin_types_compatible_p(typeof(&key_cmp_cb), \
+			int (*)(typeof(const typeof(*(*table)._key) *), typeof(const typeof(*(*table)._key) *)))); \
+	(void)COMPILE_ERROR_IF_TRUE( \
+		!__builtin_types_compatible_p(typeof(&hash_cb), \
+			unsigned int (*)(typeof((*table)._key))) && \
+		!__builtin_types_compatible_p(typeof(&hash_cb), \
+			unsigned int (*)(typeof(const typeof(*(*table)._key) *)))); \
 	hash_table_create(&(*table)._table, pool, size, \
 		(hash_callback_t *)hash_cb, \
 		(hash_cmp_callback_t *)key_cmp_cb);})
    
    
More information about the dovecot-cvs
mailing list