Converted some of the memcached API's to use size_t instead of unsigned int.
authorPadraig O'Sullivan <osullivan.padraig@gmail.com>
Wed, 15 Jul 2009 18:26:30 +0000 (14:26 -0400)
committerPadraig O'Sullivan <osullivan.padraig@gmail.com>
Wed, 15 Jul 2009 18:26:30 +0000 (14:26 -0400)
libmemcached/common.h
libmemcached/memcached.hh
libmemcached/memcached_get.c
libmemcached/memcached_get.h
libmemcached/memcached_key.c

index 7942b27a34011bf96d18887779754a6f78c47866..d37fede9b4eb618bc6c60bc0899c51858086532a 100644 (file)
@@ -136,7 +136,7 @@ void server_list_free(memcached_st *ptr, memcached_server_st *servers);
 
 LIBMEMCACHED_LOCAL
 memcached_return memcached_key_test(const char **keys, size_t *key_length,
-                                    unsigned int number_of_keys);
+                                    size_t number_of_keys);
 
 
 LIBMEMCACHED_LOCAL
index 52ce4105d9ef7a6471816f43719e19c0fb928e02..c6c3ef5e60f2a0e58e0f10b1bc2a27b38125ff71 100644 (file)
@@ -109,7 +109,7 @@ public:
     if (!real_keys.empty())
     {
       memcached_return rc= memcached_mget(&memc, &real_keys[0], &key_len[0], 
-                                          static_cast<unsigned int>(real_keys.size()));
+                                          real_keys.size());
       return (rc == MEMCACHED_SUCCESS);
     }
 
index b7e900053027f1c72fd7c98b77fe11d74007727a..f00cfafbc261b94fa26ce27f838ebba2e5811f6a 100644 (file)
@@ -103,7 +103,7 @@ char *memcached_get_by_key(memcached_st *ptr,
 
 memcached_return memcached_mget(memcached_st *ptr, 
                                 const char **keys, size_t *key_length, 
-                                unsigned int number_of_keys)
+                                size_t number_of_keys)
 {
   return memcached_mget_by_key(ptr, NULL, 0, keys, key_length, number_of_keys);
 }
@@ -112,14 +112,14 @@ static memcached_return binary_mget_by_key(memcached_st *ptr,
                                            unsigned int master_server_key,
                                            bool is_master_key_set,
                                            const char **keys, size_t *key_length,
-                                           unsigned int number_of_keys);
+                                           size_t number_of_keys);
 
 memcached_return memcached_mget_by_key(memcached_st *ptr, 
                                        const char *master_key, 
                                        size_t master_key_length,
                                        const char **keys, 
                                        size_t *key_length, 
-                                       unsigned int number_of_keys)
+                                       size_t number_of_keys)
 {
   unsigned int x;
   memcached_return rc= MEMCACHED_NOTFOUND;
@@ -260,7 +260,7 @@ static memcached_return simple_binary_mget(memcached_st *ptr,
                                            unsigned int master_server_key,
                                            bool is_master_key_set,
                                            const char **keys, size_t *key_length, 
-                                           unsigned int number_of_keys)
+                                           size_t number_of_keys)
 {
   memcached_return rc= MEMCACHED_NOTFOUND;
   uint32_t x;
@@ -361,7 +361,7 @@ static memcached_return simple_binary_mget(memcached_st *ptr,
 static memcached_return replication_binary_mget(memcached_st *ptr,
                                              uint32_t* hash, bool* dead_servers,
                                              const char **keys, size_t *key_length,
-                                             unsigned int number_of_keys)
+                                             size_t number_of_keys)
 {
   memcached_return rc= MEMCACHED_NOTFOUND;
   uint32_t x;
@@ -460,7 +460,7 @@ static memcached_return binary_mget_by_key(memcached_st *ptr,
                                            unsigned int master_server_key,
                                            bool is_master_key_set,
                                            const char **keys, size_t *key_length,
-                                           unsigned int number_of_keys)
+                                           size_t number_of_keys)
 {
   memcached_return rc;
 
index 7044442798ee5f2334323053f0d786e968a5d41a..4ea04a9457b10ff05ac2071d9eda7f2f6a2e04de 100644 (file)
@@ -24,7 +24,7 @@ char *memcached_get(memcached_st *ptr,
 LIBMEMCACHED_API
 memcached_return memcached_mget(memcached_st *ptr, 
                                 const char **keys, size_t *key_length, 
-                                unsigned int number_of_keys);
+                                size_t number_of_keys);
 
 LIBMEMCACHED_API
 char *memcached_get_by_key(memcached_st *ptr, 
@@ -40,7 +40,7 @@ memcached_return memcached_mget_by_key(memcached_st *ptr,
                                        master_key_length,
                                        const char **keys, 
                                        size_t *key_length, 
-                                       unsigned int number_of_keys);
+                                       size_t number_of_keys);
 
 LIBMEMCACHED_API
 char *memcached_fetch(memcached_st *ptr, 
index c992c338c7248a688197691db0024895b9d708d7..c8a3a0eb4f5d59d325f88614adc7ce3dad099827 100644 (file)
@@ -1,7 +1,7 @@
 #include "common.h"
 
 memcached_return memcached_key_test(const char **keys, size_t *key_length, 
-                                    unsigned int number_of_keys)
+                                    size_t number_of_keys)
 {
   uint32_t x;
   memcached_return rc;