From: Brian Aker Date: Tue, 16 Oct 2007 09:29:30 +0000 (-0700) Subject: Made string class private X-Git-Tag: 0.7~31 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=2d6f2da374b074ccf0284c4ab4ccecbd976e6cae;p=awesomized%2Flibmemcached Made string class private --- diff --git a/include/memcached.h b/include/memcached.h index 313266aa..652a77c5 100644 --- a/include/memcached.h +++ b/include/memcached.h @@ -200,21 +200,6 @@ memcached_server_st *memcached_server_list_append(memcached_server_st *ptr, unsigned int memcached_server_list_count(memcached_server_st *ptr); memcached_server_st *memcached_servers_parse(char *server_strings); -/* String Struct */ -#define memcached_string_length(A, B) (size_t)(B->end - B->string) -#define memcached_string_size(A, B) B->current_size -#define memcached_string_value(A, B) B->string - -memcached_string_st *memcached_string_create(memcached_st *ptr, size_t initial_size); -memcached_return memcached_string_append_character(memcached_st *ptr, - memcached_string_st *string, - char character); -memcached_return memcached_string_append(memcached_st *ptr, memcached_string_st *string, - char *value, size_t length); -size_t memcached_string_backspace(memcached_st *ptr, memcached_string_st *string, size_t remove); -memcached_return memcached_string_reset(memcached_st *ptr, memcached_string_st *string); -void memcached_string_free(memcached_st *ptr, memcached_string_st *string); - char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, char *key, memcached_return *error); char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *stat, diff --git a/lib/common.h b/lib/common.h index 12f9efe1..d7c9cd61 100644 --- a/lib/common.h +++ b/lib/common.h @@ -53,4 +53,20 @@ void memcached_quit_server(memcached_st *ptr, unsigned int server_key); #define memcached_server_response_increment(A,B) A->hosts[B].stack_responses++ #define memcached_server_response_decrement(A,B) A->hosts[B].stack_responses-- +/* String Struct */ +#define memcached_string_length(A, B) (size_t)(B->end - B->string) +#define memcached_string_size(A, B) B->current_size +#define memcached_string_value(A, B) B->string + +memcached_string_st *memcached_string_create(memcached_st *ptr, size_t initial_size); +memcached_return memcached_string_append_character(memcached_st *ptr, + memcached_string_st *string, + char character); +memcached_return memcached_string_append(memcached_st *ptr, memcached_string_st *string, + char *value, size_t length); +size_t memcached_string_backspace(memcached_st *ptr, memcached_string_st *string, size_t remove); +memcached_return memcached_string_reset(memcached_st *ptr, memcached_string_st *string); +void memcached_string_free(memcached_st *ptr, memcached_string_st *string); + + #endif /* __COMMON_H__ */