memcached.h   memcached.h 
skipping to change at line 27 skipping to change at line 27
#include <inttypes.h> #include <inttypes.h>
#if !defined(__cplusplus) #if !defined(__cplusplus)
# include <stdbool.h> # include <stdbool.h>
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <libmemcached/visibility.h> #include <libmemcached/visibility.h>
#include <libmemcached/memcached_configure.h> #include <libmemcached/configure.h>
#include <libmemcached/constants.h> #include <libmemcached/constants.h>
#include <libmemcached/types.h> #include <libmemcached/types.h>
#include <libmemcached/string.h> #include <libmemcached/string.h>
#include <libmemcached/stats.h> #include <libmemcached/stats.h>
// Everything above this line must be in the order specified. // Everything above this line must be in the order specified.
#include <libmemcached/analyze.h> #include <libmemcached/analyze.h>
#include <libmemcached/auto.h> #include <libmemcached/auto.h>
#include <libmemcached/behavior.h> #include <libmemcached/behavior.h>
#include <libmemcached/callback.h> #include <libmemcached/callback.h>
#include <libmemcached/dump.h> #include <libmemcached/dump.h>
skipping to change at line 55 skipping to change at line 55
#endif #endif
struct memcached_st { struct memcached_st {
struct { struct {
bool is_allocated:1; bool is_allocated:1;
bool is_initialized:1; bool is_initialized:1;
bool is_purging:1; bool is_purging:1;
} options; } options;
memcached_server_distribution_t distribution; memcached_server_distribution_t distribution;
memcached_hash_t hash; memcached_hash_t hash;
uint32_t continuum_points_counter; uint32_t continuum_points_counter; // Ketama
memcached_server_st *hosts; memcached_server_st *hosts;
memcached_server_st *last_disconnected_server; memcached_server_st *last_disconnected_server;
int32_t snd_timeout; int32_t snd_timeout;
int32_t rcv_timeout; int32_t rcv_timeout;
uint32_t server_failure_limit; uint32_t server_failure_limit;
uint32_t io_msg_watermark; uint32_t io_msg_watermark;
uint32_t io_bytes_watermark; uint32_t io_bytes_watermark;
uint32_t io_key_prefetch; uint32_t io_key_prefetch;
uint32_t number_of_hosts; uint32_t number_of_hosts;
uint32_t cursor_server;
int cached_errno; int cached_errno;
struct { struct {
bool auto_eject_hosts:1; bool auto_eject_hosts:1;
bool binary_protocol:1; bool binary_protocol:1;
bool buffer_requests:1; bool buffer_requests:1;
bool hash_with_prefix_key:1; bool hash_with_prefix_key:1;
bool ketama_weighted:1; bool ketama_weighted:1;
bool no_block:1; bool no_block:1;
bool no_reply:1; bool no_reply:1;
bool randomize_replica_read:1; bool randomize_replica_read:1;
skipping to change at line 87 skipping to change at line 86
bool support_cas:1; bool support_cas:1;
bool tcp_nodelay:1; bool tcp_nodelay:1;
bool use_cache_lookups:1; bool use_cache_lookups:1;
bool use_sort_hosts:1; bool use_sort_hosts:1;
bool use_udp:1; bool use_udp:1;
bool verify_key:1; bool verify_key:1;
} flags; } flags;
int32_t poll_timeout; int32_t poll_timeout;
int32_t connect_timeout; int32_t connect_timeout;
int32_t retry_timeout; int32_t retry_timeout;
uint32_t continuum_count; uint32_t continuum_count; // Ketama
int send_size; int send_size;
int recv_size; int recv_size;
void *user_data; void *user_data;
time_t next_distribution_rebuild; time_t next_distribution_rebuild; // Ketama
size_t prefix_key_length; size_t prefix_key_length;
uint32_t number_of_replicas; uint32_t number_of_replicas;
memcached_hash_t distribution_hash; memcached_hash_t distribution_hash;
memcached_result_st result; memcached_result_st result;
memcached_continuum_item_st *continuum; memcached_continuum_item_st *continuum; // Ketama
memcached_clone_fn on_clone; memcached_clone_fn on_clone;
memcached_cleanup_fn on_cleanup; memcached_cleanup_fn on_cleanup;
memcached_free_fn call_free; memcached_free_fn call_free;
memcached_malloc_fn call_malloc; memcached_malloc_fn call_malloc;
memcached_realloc_fn call_realloc; memcached_realloc_fn call_realloc;
memcached_calloc_fn call_calloc; memcached_calloc_fn call_calloc;
memcached_trigger_key_fn get_key_failure; memcached_trigger_key_fn get_key_failure;
memcached_trigger_delete_key_fn delete_trigger; memcached_trigger_delete_key_fn delete_trigger;
memcached_callback_st *callbacks; memcached_callback_st *callbacks;
char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE];
}; };
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_return_t memcached_version(memcached_st *ptr); memcached_return_t memcached_version(memcached_st *ptr);
LIBMEMCACHED_API
void memcached_servers_reset(memcached_st *ptr);
/* Public API */ /* Public API */
LIBMEMCACHED_API LIBMEMCACHED_API
const char * memcached_lib_version(void); const char * memcached_lib_version(void);
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_st *memcached_create(memcached_st *ptr); memcached_st *memcached_create(memcached_st *ptr);
LIBMEMCACHED_API LIBMEMCACHED_API
void memcached_free(memcached_st *ptr); void memcached_free(memcached_st *ptr);
LIBMEMCACHED_API LIBMEMCACHED_API
 End of changes. 7 change blocks. 
6 lines changed or deleted 8 lines changed or added


 server.h   server.h 
skipping to change at line 24 skipping to change at line 24
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct memcached_server_st { struct memcached_server_st {
struct { struct {
bool is_allocated:1; bool is_allocated:1;
bool sockaddr_inited:1; bool sockaddr_inited:1;
} options; } options;
uint16_t count; uint32_t number_of_hosts;
uint32_t cursor_active; uint32_t cursor_active;
in_port_t port; in_port_t port;
int cached_errno; int cached_errno;
int fd; int fd;
uint32_t io_bytes_sent; /* # bytes sent since last read */ uint32_t io_bytes_sent; /* # bytes sent since last read */
uint32_t server_failure_counter; uint32_t server_failure_counter;
uint32_t weight; uint32_t weight;
uint8_t major_version; uint8_t major_version;
uint8_t micro_version; uint8_t micro_version;
uint8_t minor_version; uint8_t minor_version;
skipping to change at line 50 skipping to change at line 50
size_t write_buffer_offset; size_t write_buffer_offset;
struct addrinfo *address_info; struct addrinfo *address_info;
time_t next_retry; time_t next_retry;
memcached_st *root; memcached_st *root;
uint64_t limit_maxbytes; uint64_t limit_maxbytes;
char read_buffer[MEMCACHED_MAX_BUFFER]; char read_buffer[MEMCACHED_MAX_BUFFER];
char write_buffer[MEMCACHED_MAX_BUFFER]; char write_buffer[MEMCACHED_MAX_BUFFER];
char hostname[MEMCACHED_MAX_HOST_LENGTH]; char hostname[MEMCACHED_MAX_HOST_LENGTH];
}; };
static inline uint32_t memcached_servers_count(memcached_server_st *servers
)
{
return servers->number_of_hosts;
}
static inline uint32_t memcached_servers_set_count(memcached_server_st *ser
vers, uint32_t count)
{
return servers->number_of_hosts= count;
}
#define memcached_server_count(A) (A)->number_of_hosts #define memcached_server_count(A) (A)->number_of_hosts
#define memcached_server_name(A,B) (B).hostname #define memcached_server_name(A,B) (B).hostname
#define memcached_server_port(A,B) (B).port #define memcached_server_port(A,B) (B).port
#define memcached_server_list(A) (A)->hosts #define memcached_server_list(A) (A)->hosts
#define memcached_server_response_count(A) (A)->cursor_active #define memcached_server_response_count(A) (A)->cursor_active
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_return_t memcached_server_cursor(memcached_st *ptr, memcached_return_t memcached_server_cursor(memcached_st *ptr,
memcached_server_fn *callback, memcached_server_fn *callback,
void *context, void *context,
 End of changes. 2 change blocks. 
1 lines changed or deleted 13 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/