Convert unsigned long to size_t in function prototypes for 32 bits systems.

This commit is contained in:
Patrick Pelissier committed 2018-04-15 01:10:49 +02:00
1 parent 175fb46508
commit 6b8bb33221
13 files changed
+34 -34

No files matched your search

+2 -2
View File
@@ -126,7 +126,7 @@ static int equal_func(const void *key1, const void *key2)
} }
static void static void
test_dict(unsigned long n) test_dict(size_t n)
{ {
HashTable *dict; HashTable *dict;
enum cc_stat stat; enum cc_stat stat;
@@ -178,7 +178,7 @@ static size_t char_hash(const void *a, int l, uint32_t seed)
} }
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
HashTable *dict; HashTable *dict;
enum cc_stat stat; enum cc_stat stat;
+3 -3
View File
@@ -25,7 +25,7 @@ using namespace std;
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict2(unsigned long n) test_dict2(size_t n)
{ {
dense_hash_map<unsigned long, unsigned long> dict; dense_hash_map<unsigned long, unsigned long> dict;
dict.set_empty_key(-1); dict.set_empty_key(-1);
@@ -75,7 +75,7 @@ namespace std {
} }
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
dense_hash_map<char_array_s, char_array_s> dict; dense_hash_map<char_array_s, char_array_s> dict;
struct char_array_s empty, del; struct char_array_s empty, del;
@@ -104,7 +104,7 @@ test_dict_big(unsigned long n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict_str(unsigned long n) test_dict_str(size_t n)
{ {
dense_hash_map<string, string> dict; dense_hash_map<string, string> dict;
string empty, del; string empty, del;
+3 -3
View File
@@ -26,7 +26,7 @@ using namespace std;
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict2(unsigned long n) test_dict2(size_t n)
{ {
flat_hash_map<unsigned long, unsigned long> dict; flat_hash_map<unsigned long, unsigned long> dict;
for (size_t i = 0; i < n; i++) { for (size_t i = 0; i < n; i++) {
@@ -62,7 +62,7 @@ namespace std {
} }
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
flat_hash_map<char_array_s, char_array_s> dict; flat_hash_map<char_array_s, char_array_s> dict;
@@ -86,7 +86,7 @@ test_dict_big(unsigned long n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict_str(unsigned long n) test_dict_str(size_t n)
{ {
flat_hash_map<string, string> dict; flat_hash_map<string, string> dict;
+2 -2
View File
@@ -97,7 +97,7 @@ static gboolean equal_func(gconstpointer a, gconstpointer b)
} }
static void static void
test_dict(unsigned long n) test_dict(size_t n)
{ {
GHashTable *dict = g_hash_table_new_full(hash_func, equal_func, free, free); GHashTable *dict = g_hash_table_new_full(hash_func, equal_func, free, free);
for (size_t i = 0; i < n; i++) { for (size_t i = 0; i < n; i++) {
@@ -140,7 +140,7 @@ static guint char_hash(gconstpointer a)
} }
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
GHashTable *dict = g_hash_table_new_full(char_hash, char_equal, free, free); GHashTable *dict = g_hash_table_new_full(char_hash, char_equal, free, free);
for (size_t i = 0; i < n; i++) { for (size_t i = 0; i < n; i++) {
+3 -3
View File
@@ -25,7 +25,7 @@ using namespace std;
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict2(unsigned long n) test_dict2(size_t n)
{ {
tsl::hopscotch_map<unsigned long, unsigned long> dict; tsl::hopscotch_map<unsigned long, unsigned long> dict;
@@ -63,7 +63,7 @@ namespace std {
} }
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
hopscotch_map<char_array_s, char_array_s> dict; hopscotch_map<char_array_s, char_array_s> dict;
@@ -87,7 +87,7 @@ test_dict_big(unsigned long n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict_str(unsigned long n) test_dict_str(size_t n)
{ {
hopscotch_map<string, string> dict; hopscotch_map<string, string> dict;
+2 -2
View File
@@ -98,7 +98,7 @@ static void test_rbtree(size_t n)
KHASH_INIT(iun, unsigned long, unsigned long, 1, hash_func, hash_eq) KHASH_INIT(iun, unsigned long, unsigned long, 1, hash_func, hash_eq)
static void static void
test_dict(unsigned long n) test_dict(size_t n)
{ {
khash_t(iun) *dict = kh_init(iun); khash_t(iun) *dict = kh_init(iun);
@@ -137,7 +137,7 @@ static inline size_t char_hash(const char_array_t a) {
KHASH_INIT(iub, char_array_t, char_array_t, 1, char_hash, char_equal_p) KHASH_INIT(iub, char_array_t, char_array_t, 1, char_hash, char_equal_p)
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
khash_t(iub) *dict = kh_init(iub); khash_t(iub) *dict = kh_init(iub);
+2 -2
View File
@@ -64,7 +64,7 @@ struct map_element
}; };
static void static void
test_dict(unsigned long n) test_dict(size_t n)
{ {
map dict; map dict;
map_construct(&dict, sizeof(map_element), (map_element[]) {{.key = -1}}, set_func); map_construct(&dict, sizeof(map_element), (map_element[]) {{.key = -1}}, set_func);
@@ -115,7 +115,7 @@ struct big_map_element
}; };
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
map dict; map dict;
big_map_element empty; big_map_element empty;
+2 -2
View File
@@ -26,7 +26,7 @@ static inline size_t fookeyfunct(const foo_t *r)
NEDTRIE_GENERATE(static, foo_tree_s, foo_s, link, fookeyfunct, NEDTRIE_NOBBLEZEROS(foo_tree_s)) NEDTRIE_GENERATE(static, foo_tree_s, foo_s, link, fookeyfunct, NEDTRIE_NOBBLEZEROS(foo_tree_s))
static void static void
test_dict(unsigned long n) test_dict(size_t n)
{ {
foo_tree_t footree; foo_tree_t footree;
NEDTRIE_INIT(&footree); NEDTRIE_INIT(&footree);
@@ -58,7 +58,7 @@ test_dict(unsigned long n)
} }
static void static void
test_dict_noalloc(unsigned long n) test_dict_noalloc(size_t n)
{ {
foo_tree_t footree; foo_tree_t footree;
NEDTRIE_INIT(&footree); NEDTRIE_INIT(&footree);
+3 -3
View File
@@ -72,7 +72,7 @@ static void test_rbtree(size_t n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict1(unsigned long n) test_dict1(size_t n)
{ {
QMap<unsigned long, unsigned long> dict; QMap<unsigned long, unsigned long> dict;
@@ -92,7 +92,7 @@ test_dict1(unsigned long n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict2(unsigned long n) test_dict2(size_t n)
{ {
QHash<unsigned long, unsigned long> dict; QHash<unsigned long, unsigned long> dict;
@@ -126,7 +126,7 @@ uint qHash(const char_array_s &k)
}; };
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
QHash<char_array_s, char_array_s> dict; QHash<char_array_s, char_array_s> dict;
+3 -3
View File
@@ -25,7 +25,7 @@ using namespace std;
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict2(unsigned long n) test_dict2(size_t n)
{ {
sparse_hash_map<unsigned long, unsigned long> dict; sparse_hash_map<unsigned long, unsigned long> dict;
@@ -63,7 +63,7 @@ namespace std {
} }
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
sparse_hash_map<char_array_s, char_array_s> dict; sparse_hash_map<char_array_s, char_array_s> dict;
@@ -87,7 +87,7 @@ test_dict_big(unsigned long n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict_str(unsigned long n) test_dict_str(size_t n)
{ {
sparse_hash_map<string, string> dict; sparse_hash_map<string, string> dict;
+5 -5
View File
@@ -73,7 +73,7 @@ static void test_rbtree(size_t n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict1(unsigned long n) test_dict1(size_t n)
{ {
map<unsigned long, unsigned long> dict; map<unsigned long, unsigned long> dict;
@@ -93,7 +93,7 @@ test_dict1(unsigned long n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict2(unsigned long n) test_dict2(size_t n)
{ {
unordered_map<unsigned long, unsigned long> dict; unordered_map<unsigned long, unsigned long> dict;
@@ -131,7 +131,7 @@ namespace std {
} }
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
unordered_map<char_array_s, char_array_s> dict; unordered_map<char_array_s, char_array_s> dict;
@@ -155,7 +155,7 @@ test_dict_big(unsigned long n)
/********************************************************************************************/ /********************************************************************************************/
static void static void
test_dict_str(unsigned long n) test_dict_str(size_t n)
{ {
unordered_map<string, string> dict; unordered_map<string, string> dict;
@@ -176,7 +176,7 @@ test_dict_str(unsigned long n)
} }
static void static void
test_dict_str2(unsigned long n) test_dict_str2(size_t n)
{ {
map<string, string> dict; map<string, string> dict;
+2 -2
View File
@@ -124,7 +124,7 @@ static int equal_func(const void* arg, const void *obj_p)
} }
static void static void
test_dict(unsigned long n) test_dict(size_t n)
{ {
tommy_hashlin dict; tommy_hashlin dict;
tommy_hashlin_init(&dict); tommy_hashlin_init(&dict);
@@ -174,7 +174,7 @@ static size_t char_hash(const char *s)
} }
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
tommy_hashlin dict; tommy_hashlin dict;
tommy_hashlin_init(&dict); tommy_hashlin_init(&dict);
+2 -2
View File
@@ -85,7 +85,7 @@ struct hash_i_node_s {
}; };
static void static void
test_dict(unsigned long n) test_dict(size_t n)
{ {
struct hash_i_node_s *dict = NULL; struct hash_i_node_s *dict = NULL;
@@ -131,7 +131,7 @@ struct hash_b_node_s {
}; };
static void static void
test_dict_big(unsigned long n) test_dict_big(size_t n)
{ {
struct hash_b_node_s *dict = NULL; struct hash_b_node_s *dict = NULL;