X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=libmemcached%2Fmemcached_get.c;h=b7e900053027f1c72fd7c98b77fe11d74007727a;hb=15b71a80142a85eb34afbad016a23bb591145f36;hp=e91db4cf363854f3aa363691c23ece90b274c8ac;hpb=f63d634e21459280599f663154089fa724903bd6;p=m6w6%2Flibmemcached diff --git a/libmemcached/memcached_get.c b/libmemcached/memcached_get.c index e91db4cf..b7e90005 100644 --- a/libmemcached/memcached_get.c +++ b/libmemcached/memcached_get.c @@ -37,7 +37,7 @@ char *memcached_get_by_key(memcached_st *ptr, *error= memcached_mget_by_key(ptr, master_key, master_key_length, - (char **)&key, &key_length, 1); + (const char **)&key, &key_length, 1); value= memcached_fetch(ptr, NULL, NULL, value_length, flags, error); @@ -102,7 +102,7 @@ char *memcached_get_by_key(memcached_st *ptr, } memcached_return memcached_mget(memcached_st *ptr, - char **keys, size_t *key_length, + const char **keys, size_t *key_length, unsigned int number_of_keys) { return memcached_mget_by_key(ptr, NULL, 0, keys, key_length, number_of_keys); @@ -111,19 +111,19 @@ memcached_return memcached_mget(memcached_st *ptr, static memcached_return binary_mget_by_key(memcached_st *ptr, unsigned int master_server_key, bool is_master_key_set, - char **keys, size_t *key_length, + const char **keys, size_t *key_length, unsigned int number_of_keys); memcached_return memcached_mget_by_key(memcached_st *ptr, const char *master_key, size_t master_key_length, - char **keys, + const char **keys, size_t *key_length, unsigned int number_of_keys) { unsigned int x; memcached_return rc= MEMCACHED_NOTFOUND; - char *get_command= "get "; + const char *get_command= "get "; uint8_t get_command_length= 4; unsigned int master_server_key= (unsigned int)-1; /* 0 is a valid server id! */ bool is_master_key_set= false; @@ -145,7 +145,7 @@ memcached_return memcached_mget_by_key(memcached_st *ptr, if (master_key && master_key_length) { - if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((char **)&master_key, &master_key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED)) + if ((ptr->flags & MEM_VERIFY_KEY) && (memcached_key_test((const char **)&master_key, &master_key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED)) return MEMCACHED_BAD_KEY_PROVIDED; master_server_key= memcached_generate_hash(ptr, master_key, master_key_length); is_master_key_set= true; @@ -259,7 +259,7 @@ memcached_return memcached_mget_by_key(memcached_st *ptr, static memcached_return simple_binary_mget(memcached_st *ptr, unsigned int master_server_key, bool is_master_key_set, - char **keys, size_t *key_length, + const char **keys, size_t *key_length, unsigned int number_of_keys) { memcached_return rc= MEMCACHED_NOTFOUND; @@ -360,7 +360,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, - char **keys, size_t *key_length, + const char **keys, size_t *key_length, unsigned int number_of_keys) { memcached_return rc= MEMCACHED_NOTFOUND; @@ -459,7 +459,7 @@ static memcached_return replication_binary_mget(memcached_st *ptr, static memcached_return binary_mget_by_key(memcached_st *ptr, unsigned int master_server_key, bool is_master_key_set, - char **keys, size_t *key_length, + const char **keys, size_t *key_length, unsigned int number_of_keys) { memcached_return rc;