From: Brian Aker Date: Fri, 9 Jan 2009 20:59:43 +0000 (-0800) Subject: Changed memcached_servers_parse() to take const X-Git-Tag: 0.26~22 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=44a07d208fc11e9133c3d45a86c199dcf56f18a1;p=awesomized%2Flibmemcached Changed memcached_servers_parse() to take const --- diff --git a/docs/memcached_server_st.pod b/docs/memcached_server_st.pod index 45a55bef..b0a20d8c 100755 --- a/docs/memcached_server_st.pod +++ b/docs/memcached_server_st.pod @@ -21,7 +21,7 @@ C Client Library for memcached (libmemcached, -lmemcached) unsigned int memcached_server_list_count (memcached_server_st *ptr); - memcached_server_st *memcached_servers_parse (char *server_strings); + memcached_server_st *memcached_servers_parse (const char *server_strings); =head1 DESCRIPTION diff --git a/libmemcached/memcached.h b/libmemcached/memcached.h index 0ebe6e30..b6092292 100644 --- a/libmemcached/memcached.h +++ b/libmemcached/memcached.h @@ -170,10 +170,10 @@ memcached_server_st *memcached_server_list_append_with_weight(memcached_server_s uint32_t weight, memcached_return *error); unsigned int memcached_server_list_count(memcached_server_st *ptr); -memcached_server_st *memcached_servers_parse(char *server_strings); +memcached_server_st *memcached_servers_parse(const char *server_strings); char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, - char *key, memcached_return *error); + const char *key, memcached_return *error); char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *stat, memcached_return *error); diff --git a/libmemcached/memcached_parse.c b/libmemcached/memcached_parse.c index d3d364a0..8bb56f53 100644 --- a/libmemcached/memcached_parse.c +++ b/libmemcached/memcached_parse.c @@ -8,7 +8,7 @@ #include #include "common.h" -memcached_server_st *memcached_servers_parse(char *server_strings) +memcached_server_st *memcached_servers_parse(const char *server_strings) { char *string; unsigned int port; diff --git a/libmemcached/memcached_stats.c b/libmemcached/memcached_stats.c index 96f0eb1c..87bc3ace 100644 --- a/libmemcached/memcached_stats.c +++ b/libmemcached/memcached_stats.c @@ -143,7 +143,7 @@ static void set_data(memcached_stat_st *stat, char *key, char *value) } char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, - char *key, memcached_return *error) + const char *key, memcached_return *error) { char buffer[SMALL_STRING_LEN]; size_t length;