From: Padraig O'Sullivan Date: Wed, 15 Jul 2009 18:26:30 +0000 (-0400) Subject: Converted some of the memcached API's to use size_t instead of unsigned int. X-Git-Tag: 0.32~12^2~4 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3f4d3e26db2dafabf270e964ba2be0dd72756c4d;p=m6w6%2Flibmemcached Converted some of the memcached API's to use size_t instead of unsigned int. --- diff --git a/libmemcached/common.h b/libmemcached/common.h index 7942b27a..d37fede9 100644 --- a/libmemcached/common.h +++ b/libmemcached/common.h @@ -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 diff --git a/libmemcached/memcached.hh b/libmemcached/memcached.hh index 52ce4105..c6c3ef5e 100644 --- a/libmemcached/memcached.hh +++ b/libmemcached/memcached.hh @@ -109,7 +109,7 @@ public: if (!real_keys.empty()) { memcached_return rc= memcached_mget(&memc, &real_keys[0], &key_len[0], - static_cast(real_keys.size())); + real_keys.size()); return (rc == MEMCACHED_SUCCESS); } diff --git a/libmemcached/memcached_get.c b/libmemcached/memcached_get.c index b7e90005..f00cfafb 100644 --- a/libmemcached/memcached_get.c +++ b/libmemcached/memcached_get.c @@ -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; diff --git a/libmemcached/memcached_get.h b/libmemcached/memcached_get.h index 70444427..4ea04a94 100644 --- a/libmemcached/memcached_get.h +++ b/libmemcached/memcached_get.h @@ -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, diff --git a/libmemcached/memcached_key.c b/libmemcached/memcached_key.c index c992c338..c8a3a0eb 100644 --- a/libmemcached/memcached_key.c +++ b/libmemcached/memcached_key.c @@ -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;