algorithm.h   algorithm.h 
skipping to change at line 38 skipping to change at line 38
HASHKIT_API HASHKIT_API
uint32_t libhashkit_fnv1_32(const char *key, size_t key_length); uint32_t libhashkit_fnv1_32(const char *key, size_t key_length);
HASHKIT_API HASHKIT_API
uint32_t libhashkit_fnv1a_32(const char *key, size_t key_length); uint32_t libhashkit_fnv1a_32(const char *key, size_t key_length);
HASHKIT_API HASHKIT_API
uint32_t libhashkit_crc32(const char *key, size_t key_length); uint32_t libhashkit_crc32(const char *key, size_t key_length);
#ifdef HAVE_HSIEH_HASH
HASHKIT_API HASHKIT_API
uint32_t libhashkit_hsieh(const char *key, size_t key_length); uint32_t libhashkit_hsieh(const char *key, size_t key_length);
#endif
#ifdef HAVE_MURMUR_HASH
HASHKIT_API HASHKIT_API
uint32_t libhashkit_murmur(const char *key, size_t key_length); uint32_t libhashkit_murmur(const char *key, size_t key_length);
#endif
HASHKIT_API HASHKIT_API
uint32_t libhashkit_jenkins(const char *key, size_t key_length); uint32_t libhashkit_jenkins(const char *key, size_t key_length);
HASHKIT_API HASHKIT_API
uint32_t libhashkit_md5(const char *key, size_t key_length); uint32_t libhashkit_md5(const char *key, size_t key_length);
HASHKIT_LOCAL HASHKIT_LOCAL
uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *co ntext); uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *co ntext);
skipping to change at line 72 skipping to change at line 68
HASHKIT_LOCAL HASHKIT_LOCAL
uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context) ; uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context) ;
HASHKIT_LOCAL HASHKIT_LOCAL
uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context ); uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context );
HASHKIT_LOCAL HASHKIT_LOCAL
uint32_t hashkit_crc32(const char *key, size_t key_length, void *context); uint32_t hashkit_crc32(const char *key, size_t key_length, void *context);
#ifdef HAVE_HSIEH_HASH
HASHKIT_LOCAL HASHKIT_LOCAL
uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context); uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context);
#endif
#ifdef HAVE_MURMUR_HASH
HASHKIT_LOCAL HASHKIT_LOCAL
uint32_t hashkit_murmur(const char *key, size_t key_length, void *context); uint32_t hashkit_murmur(const char *key, size_t key_length, void *context);
#endif
HASHKIT_LOCAL HASHKIT_LOCAL
uint32_t hashkit_jenkins(const char *key, size_t key_length, void *context) ; uint32_t hashkit_jenkins(const char *key, size_t key_length, void *context) ;
HASHKIT_LOCAL HASHKIT_LOCAL
uint32_t hashkit_md5(const char *key, size_t key_length, void *context); uint32_t hashkit_md5(const char *key, size_t key_length, void *context);
HASHKIT_API HASHKIT_API
void libhashkit_md5_signature(const unsigned char *key, size_t length, unsi gned char *result); void libhashkit_md5_signature(const unsigned char *key, size_t length, unsi gned char *result);
 End of changes. 8 change blocks. 
8 lines changed or deleted 0 lines changed or added


 cache.h   cache.h 
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
*
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
*
* * The names of its contributors may not be used to endorse or
* promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#ifndef CACHE_H #pragma once
#define CACHE_H
#include <pthread.h> #include <pthread.h>
#ifdef HAVE_UMEM_H #ifdef HAVE_UMEM_H
#include <umem.h> # include <umem.h>
#define cache_t umem_cache_t # define cache_t umem_cache_t
#define cache_alloc(a) umem_cache_alloc(a, UMEM_DEFAULT) # define cache_alloc(a) umem_cache_alloc(a, UMEM_DEFAULT)
#define cache_free(a, b) umem_cache_free(a, b) # define cache_free(a, b) umem_cache_free(a, b)
#define cache_create(a,b,c,d,e) umem_cache_create((char*)a, b, c, d, e, NUL # define cache_create(a,b,c,d,e) umem_cache_create((char*)a, b, c, d, e, NU
L, NULL, NULL, 0) LL, NULL, NULL, 0)
#define cache_destroy(a) umem_cache_destroy(a); # define cache_destroy(a) umem_cache_destroy(a);
#else #else
# ifndef NDEBUG
#ifndef NDEBUG
/* may be used for debug purposes */ /* may be used for debug purposes */
extern int cache_error; extern int cache_error;
#endif # endif
/** /**
* Constructor used to initialize allocated objects * Constructor used to initialize allocated objects
* *
* @param obj pointer to the object to initialized. * @param obj pointer to the object to initialized.
* @param notused1 This parameter is currently not used. * @param notused1 This parameter is currently not used.
* @param notused2 This parameter is currently not used. * @param notused2 This parameter is currently not used.
* @return you should return 0, but currently this is not checked * @return you should return 0, but currently this is not checked
*/ */
typedef int cache_constructor_t(void* obj, void* notused1, int notused2); typedef int cache_constructor_t(void* obj, void* notused1, int notused2);
skipping to change at line 114 skipping to change at line 148
/** /**
* Return an object back to the cache. * Return an object back to the cache.
* *
* The caller should return the object in an initialized state so that * The caller should return the object in an initialized state so that
* the object may be returned in an expected state from cache_alloc. * the object may be returned in an expected state from cache_alloc.
* *
* @param handle handle to the object cache to return the object to * @param handle handle to the object cache to return the object to
* @param ptr pointer to the object to return. * @param ptr pointer to the object to return.
*/ */
void cache_free(cache_t* handle, void* ptr); void cache_free(cache_t* handle, void* ptr);
#endif #endif // HAVE_UMEM_H
#endif
 End of changes. 6 change blocks. 
13 lines changed or deleted 47 lines changed or added


 hashkit.h   hashkit.h 
skipping to change at line 49 skipping to change at line 49
#if !defined(__cplusplus) #if !defined(__cplusplus)
# include <stdbool.h> # include <stdbool.h>
#endif #endif
#include <inttypes.h> #include <inttypes.h>
#include <sys/types.h> #include <sys/types.h>
#include <libhashkit/visibility.h> #include <libhashkit/visibility.h>
#include <libhashkit/configure.h> #include <libhashkit/configure.h>
#include <libhashkit/types.h> #include <libhashkit/types.h>
#include <libhashkit/has.h>
#include <libhashkit/algorithm.h> #include <libhashkit/algorithm.h>
#include <libhashkit/behavior.h> #include <libhashkit/behavior.h>
#include <libhashkit/digest.h> #include <libhashkit/digest.h>
#include <libhashkit/function.h> #include <libhashkit/function.h>
#include <libhashkit/str_algorithm.h> #include <libhashkit/str_algorithm.h>
#include <libhashkit/strerror.h> #include <libhashkit/strerror.h>
struct hashkit_st struct hashkit_st
{ {
struct hashkit_function_st { struct hashkit_function_st {
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 memcached.h   memcached.h 
skipping to change at line 68 skipping to change at line 68
#include <libhashkit/hashkit.h> #include <libhashkit/hashkit.h>
// Everything above this line must be in the order specified. // Everything above this line must be in the order specified.
#include <libmemcached/allocators.h> #include <libmemcached/allocators.h>
#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/delete.h> #include <libmemcached/delete.h>
#include <libmemcached/dump.h> #include <libmemcached/dump.h>
#include <libmemcached/exist.h>
#include <libmemcached/fetch.h> #include <libmemcached/fetch.h>
#include <libmemcached/flush.h> #include <libmemcached/flush.h>
#include <libmemcached/flush_buffers.h> #include <libmemcached/flush_buffers.h>
#include <libmemcached/get.h> #include <libmemcached/get.h>
#include <libmemcached/hash.h> #include <libmemcached/hash.h>
#include <libmemcached/namespace.h> #include <libmemcached/namespace.h>
#include <libmemcached/options.h> #include <libmemcached/options.h>
#include <libmemcached/parse.h> #include <libmemcached/parse.h>
#include <libmemcached/quit.h> #include <libmemcached/quit.h>
#include <libmemcached/result.h> #include <libmemcached/result.h>
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 pool.h   pool.h 
skipping to change at line 65 skipping to change at line 65
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_st* memcached_pool_destroy(memcached_pool_st* pool); memcached_st* memcached_pool_destroy(memcached_pool_st* pool);
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_st* memcached_pool_pop(memcached_pool_st* pool, memcached_st* memcached_pool_pop(memcached_pool_st* pool,
bool block, bool block,
memcached_return_t* rc); memcached_return_t* rc);
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_return_t memcached_pool_push(memcached_pool_st* pool,
memcached_st* mmc); memcached_st* mmc);
LIBMEMCACHED_API
memcached_return_t memcached_pool_release(memcached_pool_st* pool, memcac
hed_st* mmc);
LIBMEMCACHED_API
memcached_st* memcached_pool_fetch(memcached_pool_st*, struct timespec* rel
ative_time, memcached_return_t* rc);
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_return_t memcached_pool_behavior_set(memcached_pool_st *ptr, memcached_return_t memcached_pool_behavior_set(memcached_pool_st *ptr,
memcached_behavior_t flag, memcached_behavior_t flag,
uint64_t data); uint64_t data);
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_return_t memcached_pool_behavior_get(memcached_pool_st *ptr, memcached_return_t memcached_pool_behavior_get(memcached_pool_st *ptr,
memcached_behavior_t flag, memcached_behavior_t flag,
uint64_t *value); uint64_t *value);
 End of changes. 1 change blocks. 
0 lines changed or deleted 7 lines changed or added


 return.h   return.h 
skipping to change at line 118 skipping to change at line 118
{ {
return (rc != MEMCACHED_SUCCESS && return (rc != MEMCACHED_SUCCESS &&
rc != MEMCACHED_END && rc != MEMCACHED_END &&
rc != MEMCACHED_STORED && rc != MEMCACHED_STORED &&
rc != MEMCACHED_STAT && rc != MEMCACHED_STAT &&
rc != MEMCACHED_DELETED && rc != MEMCACHED_DELETED &&
rc != MEMCACHED_BUFFERED && rc != MEMCACHED_BUFFERED &&
rc != MEMCACHED_VALUE); rc != MEMCACHED_VALUE);
} }
static inline bool memcached_fatal(memcached_return_t rc)
{
return (rc != MEMCACHED_SUCCESS &&
rc != MEMCACHED_END &&
rc != MEMCACHED_STORED &&
rc != MEMCACHED_STAT &&
rc != MEMCACHED_DELETED &&
rc != MEMCACHED_BUFFERED &&
rc != MEMCACHED_VALUE);
}
#define memcached_continue(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_IN_PROGRESS) #define memcached_continue(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_IN_PROGRESS)
 End of changes. 1 change blocks. 
0 lines changed or deleted 11 lines changed or added


 server.h   server.h 
skipping to change at line 44 skipping to change at line 44
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
#pragma once #pragma once
#ifndef WIN32 #ifndef WIN32
#include <netdb.h> #include <netdb.h>
#endif #endif
#ifdef NI_MAXHOST
#define MEMCACHED_NI_MAXHOST NI_MAXHOST
#else
#define MEMCACHED_NI_MAXHOST 1025
#endif
enum memcached_server_state_t { enum memcached_server_state_t {
MEMCACHED_SERVER_STATE_NEW, // fd == -1, no address lookup has been done MEMCACHED_SERVER_STATE_NEW, // fd == -1, no address lookup has been done
MEMCACHED_SERVER_STATE_ADDRINFO, // ADDRRESS information has been gathere d MEMCACHED_SERVER_STATE_ADDRINFO, // ADDRRESS information has been gathere d
MEMCACHED_SERVER_STATE_IN_PROGRESS, MEMCACHED_SERVER_STATE_IN_PROGRESS,
MEMCACHED_SERVER_STATE_CONNECTED, MEMCACHED_SERVER_STATE_CONNECTED,
MEMCACHED_SERVER_STATE_IN_TIMEOUT MEMCACHED_SERVER_STATE_IN_TIMEOUT
}; };
struct memcached_server_st { struct memcached_server_st {
struct { struct {
skipping to change at line 89 skipping to change at line 95
size_t read_data_length; size_t read_data_length;
size_t write_buffer_offset; size_t write_buffer_offset;
struct addrinfo *address_info; struct addrinfo *address_info;
struct addrinfo *address_info_next; struct addrinfo *address_info_next;
time_t next_retry; time_t next_retry;
memcached_st *root; memcached_st *root;
uint64_t limit_maxbytes; uint64_t limit_maxbytes;
struct memcached_error_t *error_messages; struct memcached_error_t *error_messages;
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[NI_MAXHOST]; char hostname[MEMCACHED_NI_MAXHOST];
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
LIBMEMCACHED_API LIBMEMCACHED_API
memcached_return_t memcached_server_cursor(const memcached_st *ptr, memcached_return_t memcached_server_cursor(const memcached_st *ptr,
const memcached_server_fn *callb ack, const memcached_server_fn *callb ack,
void *context, void *context,
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added


 types.h   types.h 
skipping to change at line 49 skipping to change at line 49
typedef enum { typedef enum {
HASHKIT_SUCCESS, HASHKIT_SUCCESS,
HASHKIT_FAILURE, HASHKIT_FAILURE,
HASHKIT_MEMORY_ALLOCATION_FAILURE, HASHKIT_MEMORY_ALLOCATION_FAILURE,
HASHKIT_INVALID_HASH, HASHKIT_INVALID_HASH,
HASHKIT_INVALID_ARGUMENT, HASHKIT_INVALID_ARGUMENT,
HASHKIT_MAXIMUM_RETURN /* Always add new error code before */ HASHKIT_MAXIMUM_RETURN /* Always add new error code before */
} hashkit_return_t; } hashkit_return_t;
#define hashkit_success(X) ((X) == HASHKIT_SUCCESS) static inline bool hashkit_success(const hashkit_return_t rc)
#define hashkit_failed(X) ((X) != HASHKIT_SUCCESS) {
return (rc == HASHKIT_SUCCESS);
}
static inline bool hashkit_failed(const hashkit_return_t rc)
{
return (rc != HASHKIT_SUCCESS);
}
typedef enum { typedef enum {
HASHKIT_HASH_DEFAULT= 0, // hashkit_one_at_a_time() HASHKIT_HASH_DEFAULT= 0, // hashkit_one_at_a_time()
HASHKIT_HASH_MD5, HASHKIT_HASH_MD5,
HASHKIT_HASH_CRC, HASHKIT_HASH_CRC,
HASHKIT_HASH_FNV1_64, HASHKIT_HASH_FNV1_64,
HASHKIT_HASH_FNV1A_64, HASHKIT_HASH_FNV1A_64,
HASHKIT_HASH_FNV1_32, HASHKIT_HASH_FNV1_32,
HASHKIT_HASH_FNV1A_32, HASHKIT_HASH_FNV1A_32,
HASHKIT_HASH_HSIEH, HASHKIT_HASH_HSIEH,
 End of changes. 1 change blocks. 
2 lines changed or deleted 9 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/