| memcached.h | | memcached.h | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| #define __MEMCACHED_H__ | | #define __MEMCACHED_H__ | |
| | | | |
| #include <stdlib.h> | | #include <stdlib.h> | |
| #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> | |
| | | | |
|
| #ifdef MEMCACHED_INTERNAL | | #include <libmemcached/visibility.h> | |
| #include <libmemcached/libmemcached_config.h> | | #include <libmemcached/memcached_configure.h> | |
| #endif | | | |
| #include <libmemcached/memcached_constants.h> | | #include <libmemcached/memcached_constants.h> | |
| #include <libmemcached/memcached_types.h> | | #include <libmemcached/memcached_types.h> | |
|
| #include <libmemcached/memcached_watchpoint.h> | | | |
| #include <libmemcached/memcached_get.h> | | #include <libmemcached/memcached_get.h> | |
| #include <libmemcached/memcached_server.h> | | #include <libmemcached/memcached_server.h> | |
| #include <libmemcached/memcached_string.h> | | #include <libmemcached/memcached_string.h> | |
| #include <libmemcached/memcached_result.h> | | #include <libmemcached/memcached_result.h> | |
|
| | | #include <libmemcached/memcached_storage.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
|
| /* These are Private and should not be used by applications */ | | | |
| #define MEMCACHED_VERSION_STRING_LENGTH 24 | | #define MEMCACHED_VERSION_STRING_LENGTH 24 | |
|
| | | #define LIBMEMCACHED_VERSION_STRING "0.31" | |
| /* string value */ | | | |
| struct memcached_continuum_item_st { | | | |
| uint32_t index; | | | |
| uint32_t value; | | | |
| }; | | | |
| | | | |
| #define LIBMEMCACHED_VERSION_STRING "0.30" | | | |
| | | | |
| struct memcached_analysis_st { | | struct memcached_analysis_st { | |
| uint32_t average_item_size; | | uint32_t average_item_size; | |
| uint32_t longest_uptime; | | uint32_t longest_uptime; | |
| uint32_t least_free_server; | | uint32_t least_free_server; | |
| uint32_t most_consumed_server; | | uint32_t most_consumed_server; | |
| uint32_t oldest_server; | | uint32_t oldest_server; | |
| double pool_hit_ratio; | | double pool_hit_ratio; | |
| uint64_t most_used_bytes; | | uint64_t most_used_bytes; | |
| uint64_t least_remaining_bytes; | | uint64_t least_remaining_bytes; | |
| | | | |
| skipping to change at line 119 | | skipping to change at line 110 | |
| time_t next_distribution_rebuild; | | time_t next_distribution_rebuild; | |
| size_t prefix_key_length; | | size_t prefix_key_length; | |
| memcached_hash hash_continuum; | | memcached_hash hash_continuum; | |
| memcached_result_st result; | | memcached_result_st result; | |
| memcached_continuum_item_st *continuum; | | memcached_continuum_item_st *continuum; | |
| memcached_clone_func on_clone; | | memcached_clone_func on_clone; | |
| memcached_cleanup_func on_cleanup; | | memcached_cleanup_func on_cleanup; | |
| memcached_free_function call_free; | | memcached_free_function call_free; | |
| memcached_malloc_function call_malloc; | | memcached_malloc_function call_malloc; | |
| memcached_realloc_function call_realloc; | | memcached_realloc_function call_realloc; | |
|
| | | memcached_calloc_function call_calloc; | |
| memcached_trigger_key get_key_failure; | | memcached_trigger_key get_key_failure; | |
| memcached_trigger_delete_key delete_trigger; | | memcached_trigger_delete_key delete_trigger; | |
| char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; | | char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; | |
|
| | | uint32_t number_of_replicas; | |
| }; | | }; | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| | | memcached_return memcached_version(memcached_st *ptr); | |
| | | | |
| /* Public API */ | | /* Public API */ | |
|
| | | | |
| | | LIBMEMCACHED_API | |
| const char * memcached_lib_version(void); | | const char * memcached_lib_version(void); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_st *memcached_create(memcached_st *ptr); | | memcached_st *memcached_create(memcached_st *ptr); | |
|
| | | LIBMEMCACHED_API | |
| void memcached_free(memcached_st *ptr); | | void memcached_free(memcached_st *ptr); | |
|
| | | LIBMEMCACHED_API | |
| memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr); | | memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_delete(memcached_st *ptr, const char *key, size_
t key_length, | | memcached_return memcached_delete(memcached_st *ptr, const char *key, size_
t key_length, | |
| time_t expiration); | | time_t expiration); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_increment(memcached_st *ptr, | | memcached_return memcached_increment(memcached_st *ptr, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| uint32_t offset, | | uint32_t offset, | |
| uint64_t *value); | | uint64_t *value); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_decrement(memcached_st *ptr, | | memcached_return memcached_decrement(memcached_st *ptr, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| uint32_t offset, | | uint32_t offset, | |
| uint64_t *value); | | uint64_t *value); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_increment_with_initial(memcached_st *ptr, | | memcached_return memcached_increment_with_initial(memcached_st *ptr, | |
| const char *key, | | const char *key, | |
| size_t key_length, | | size_t key_length, | |
| uint64_t offset, | | uint64_t offset, | |
| uint64_t initial, | | uint64_t initial, | |
| time_t expiration, | | time_t expiration, | |
| uint64_t *value); | | uint64_t *value); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_decrement_with_initial(memcached_st *ptr, | | memcached_return memcached_decrement_with_initial(memcached_st *ptr, | |
| const char *key, | | const char *key, | |
| size_t key_length, | | size_t key_length, | |
| uint64_t offset, | | uint64_t offset, | |
| uint64_t initial, | | uint64_t initial, | |
| time_t expiration, | | time_t expiration, | |
| uint64_t *value); | | uint64_t *value); | |
|
| | | LIBMEMCACHED_API | |
| void memcached_stat_free(memcached_st *, memcached_stat_st *); | | void memcached_stat_free(memcached_st *, memcached_stat_st *); | |
|
| | | LIBMEMCACHED_API | |
| memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_
return *error); | | memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_
return *error); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_stat_servername(memcached_stat_st *stat, char *a
rgs, | | memcached_return memcached_stat_servername(memcached_stat_st *stat, char *a
rgs, | |
| char *hostname, unsigned int por
t); | | char *hostname, unsigned int por
t); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_flush(memcached_st *ptr, time_t expiration); | | memcached_return memcached_flush(memcached_st *ptr, time_t expiration); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_verbosity(memcached_st *ptr, unsigned int verbos
ity); | | memcached_return memcached_verbosity(memcached_st *ptr, unsigned int verbos
ity); | |
|
| | | LIBMEMCACHED_API | |
| void memcached_quit(memcached_st *ptr); | | void memcached_quit(memcached_st *ptr); | |
|
| | | LIBMEMCACHED_API | |
| char *memcached_strerror(memcached_st *ptr, memcached_return rc); | | char *memcached_strerror(memcached_st *ptr, memcached_return rc); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavi
or flag, uint64_t data); | | memcached_return memcached_behavior_set(memcached_st *ptr, memcached_behavi
or flag, uint64_t data); | |
|
| | | LIBMEMCACHED_API | |
| uint64_t memcached_behavior_get(memcached_st *ptr, memcached_behavior flag)
; | | uint64_t memcached_behavior_get(memcached_st *ptr, memcached_behavior flag)
; | |
| | | | |
| /* The two public hash bits */ | | /* The two public hash bits */ | |
|
| | | LIBMEMCACHED_API | |
| uint32_t memcached_generate_hash_value(const char *key, size_t key_length,
memcached_hash hash_algorithm); | | uint32_t memcached_generate_hash_value(const char *key, size_t key_length,
memcached_hash hash_algorithm); | |
|
| | | LIBMEMCACHED_API | |
| uint32_t memcached_generate_hash(memcached_st *ptr, const char *key, size_t
key_length); | | uint32_t memcached_generate_hash(memcached_st *ptr, const char *key, size_t
key_length); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_flush_buffers(memcached_st *mem); | | memcached_return memcached_flush_buffers(memcached_st *mem); | |
| | | | |
| /* Server Public functions */ | | /* Server Public functions */ | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_server_add_udp(memcached_st *ptr, | | memcached_return memcached_server_add_udp(memcached_st *ptr, | |
| const char *hostname, | | const char *hostname, | |
| unsigned int port); | | unsigned int port); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_server_add_unix_socket(memcached_st *ptr, | | memcached_return memcached_server_add_unix_socket(memcached_st *ptr, | |
| const char *filename); | | const char *filename); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_server_add(memcached_st *ptr, const char *hostna
me, | | memcached_return memcached_server_add(memcached_st *ptr, const char *hostna
me, | |
| unsigned int port); | | unsigned int port); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_server_add_udp_with_weight(memcached_st *ptr, | | memcached_return memcached_server_add_udp_with_weight(memcached_st *ptr, | |
| const char *hostname, | | const char *hostname, | |
| unsigned int port, | | unsigned int port, | |
| uint32_t weight); | | uint32_t weight); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_server_add_unix_socket_with_weight(memcached_st
*ptr, | | memcached_return memcached_server_add_unix_socket_with_weight(memcached_st
*ptr, | |
| const char *f
ilename, | | const char *f
ilename, | |
| uint32_t weig
ht); | | uint32_t weig
ht); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_server_add_with_weight(memcached_st *ptr, const
char *hostname, | | memcached_return memcached_server_add_with_weight(memcached_st *ptr, const
char *hostname, | |
| unsigned int port, | | unsigned int port, | |
| uint32_t weight); | | uint32_t weight); | |
|
| | | LIBMEMCACHED_API | |
| void memcached_server_list_free(memcached_server_st *ptr); | | void memcached_server_list_free(memcached_server_st *ptr); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_server_push(memcached_st *ptr, memcached_server_
st *list); | | memcached_return memcached_server_push(memcached_st *ptr, memcached_server_
st *list); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_server_st *memcached_server_list_append(memcached_server_st *ptr, | | memcached_server_st *memcached_server_list_append(memcached_server_st *ptr, | |
| const char *hostname, | | const char *hostname, | |
| unsigned int port, | | unsigned int port, | |
| memcached_return *error); | | memcached_return *error); | |
|
| | | LIBMEMCACHED_API | |
| memcached_server_st *memcached_server_list_append_with_weight(memcached_ser
ver_st *ptr, | | memcached_server_st *memcached_server_list_append_with_weight(memcached_ser
ver_st *ptr, | |
| const char *h
ostname, | | const char *h
ostname, | |
| unsigned int
port, | | unsigned int
port, | |
| uint32_t weig
ht, | | uint32_t weig
ht, | |
| memcached_ret
urn *error); | | memcached_ret
urn *error); | |
|
| | | LIBMEMCACHED_API | |
| unsigned int memcached_server_list_count(memcached_server_st *ptr); | | unsigned int memcached_server_list_count(memcached_server_st *ptr); | |
|
| | | LIBMEMCACHED_API | |
| memcached_server_st *memcached_servers_parse(const char *server_strings); | | memcached_server_st *memcached_servers_parse(const char *server_strings); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, | | char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, | |
| const char *key, memcached_return *error); | | const char *key, memcached_return *error); | |
|
| | | LIBMEMCACHED_API | |
| char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *stat, | | char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *stat, | |
| memcached_return *error); | | memcached_return *error); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_delete_by_key(memcached_st *ptr, | | memcached_return memcached_delete_by_key(memcached_st *ptr, | |
| const char *master_key, size_t mas
ter_key_length, | | const char *master_key, size_t mas
ter_key_length, | |
| const char *key, size_t key_length
, | | const char *key, size_t key_length
, | |
| time_t expiration); | | time_t expiration); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_fetch_execute(memcached_st *ptr, | | memcached_return memcached_fetch_execute(memcached_st *ptr, | |
| memcached_execute_function *ca
llback, | | memcached_execute_function *ca
llback, | |
| void *context, | | void *context, | |
| unsigned int number_of_callbac
ks); | | unsigned int number_of_callbac
ks); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_callback_set(memcached_st *ptr, | | memcached_return memcached_callback_set(memcached_st *ptr, | |
| memcached_callback flag, | | memcached_callback flag, | |
| void *data); | | void *data); | |
|
| | | LIBMEMCACHED_API | |
| void *memcached_callback_get(memcached_st *ptr, | | void *memcached_callback_get(memcached_st *ptr, | |
| memcached_callback flag, | | memcached_callback flag, | |
| memcached_return *error); | | memcached_return *error); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_dump(memcached_st *ptr, memcached_dump_func *fun
ction, void *context, uint32_t number_of_callbacks); | | memcached_return memcached_dump(memcached_st *ptr, memcached_dump_func *fun
ction, void *context, uint32_t number_of_callbacks); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| | | memcached_return memcached_set_memory_allocators(memcached_st *ptr, | |
| | | memcached_malloc_function | |
| | | mem_malloc, | |
| | | memcached_free_function me | |
| | | m_free, | |
| | | memcached_realloc_function | |
| | | mem_realloc, | |
| | | memcached_calloc_function | |
| | | mem_calloc); | |
| | | | |
| | | LIBMEMCACHED_API | |
| | | void memcached_get_memory_allocators(memcached_st *ptr, | |
| | | memcached_malloc_function *mem_malloc, | |
| | | memcached_free_function *mem_free, | |
| | | memcached_realloc_function *mem_reallo | |
| | | c, | |
| | | memcached_calloc_function *mem_calloc) | |
| | | ; | |
| | | | |
| | | LIBMEMCACHED_API | |
| | | void *memcached_get_user_data(memcached_st *ptr); | |
| | | LIBMEMCACHED_API | |
| | | void *memcached_set_user_data(memcached_st *ptr, void *data); | |
| | | | |
| | | LIBMEMCACHED_API | |
| | | memcached_return run_distribution(memcached_st *ptr); | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
|
| #include <libmemcached/memcached_storage.h> | | | |
| | | | |
| #endif /* __MEMCACHED_H__ */ | | #endif /* __MEMCACHED_H__ */ | |
| | | | |
End of changes. 50 change blocks. |
| 15 lines changed or deleted | | 77 lines changed or added | |
|
| memcached.hh | | memcached.hh | |
| | | | |
| skipping to change at line 144 | | skipping to change at line 144 | |
| } | | } | |
| memcached_return append_by_key(const char *master_key, const char *key, | | memcached_return append_by_key(const char *master_key, const char *key, | |
| const char *value, size_t value_length) | | const char *value, size_t value_length) | |
| { | | { | |
| return memcached_append_by_key(&memc, | | return memcached_append_by_key(&memc, | |
| master_key, strlen(master_key), | | master_key, strlen(master_key), | |
| key, strlen(key), | | key, strlen(key), | |
| value, value_length, 0, 0); | | value, value_length, 0, 0); | |
| } | | } | |
| memcached_return cas(const char *key, const char *value, | | memcached_return cas(const char *key, const char *value, | |
|
| size_t value_length, uint64_t cas) | | size_t value_length, uint64_t cas_arg) | |
| { | | { | |
| return memcached_cas(&memc, key, strlen(key), | | return memcached_cas(&memc, key, strlen(key), | |
|
| value, value_length, 0, 0, cas); | | value, value_length, 0, 0, cas_arg); | |
| } | | } | |
| memcached_return cas_by_key(const char *master_key, const char *key, | | memcached_return cas_by_key(const char *master_key, const char *key, | |
| const char *value, size_t value_length, | | const char *value, size_t value_length, | |
|
| uint64_t cas) | | uint64_t cas_arg) | |
| { | | { | |
| return memcached_cas_by_key(&memc, | | return memcached_cas_by_key(&memc, | |
| master_key, strlen(master_key), | | master_key, strlen(master_key), | |
| key, strlen(key), | | key, strlen(key), | |
| value, value_length, | | value, value_length, | |
|
| 0, 0, cas); | | 0, 0, cas_arg); | |
| } | | } | |
| // using 'remove' vs. 'delete' since 'delete' is a keyword | | // using 'remove' vs. 'delete' since 'delete' is a keyword | |
| memcached_return remove(const char *key) | | memcached_return remove(const char *key) | |
| { | | { | |
| return memcached_delete (&memc, key, strlen(key), 0); | | return memcached_delete (&memc, key, strlen(key), 0); | |
| | | | |
| } | | } | |
| memcached_return delete_by_key(const char *master_key, const char *key) | | memcached_return delete_by_key(const char *master_key, const char *key) | |
| { | | { | |
| return memcached_delete_by_key(&memc, master_key, strlen(master_key), | | return memcached_delete_by_key(&memc, master_key, strlen(master_key), | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 4 lines changed or added | |
|
| memcached_constants.h | | memcached_constants.h | |
| | | | |
| skipping to change at line 12 | | skipping to change at line 12 | |
| * Summary: Constants for libmemcached | | * Summary: Constants for libmemcached | |
| * | | * | |
| * Copy: See Copyright for the status of this software. | | * Copy: See Copyright for the status of this software. | |
| * | | * | |
| * Author: Brian Aker | | * Author: Brian Aker | |
| */ | | */ | |
| | | | |
| #ifndef __MEMCACHED_CONSTANTS_H__ | | #ifndef __MEMCACHED_CONSTANTS_H__ | |
| #define __MEMCACHED_CONSTANTS_H__ | | #define __MEMCACHED_CONSTANTS_H__ | |
| | | | |
|
| #ifdef __cplusplus | | | |
| extern "C" { | | | |
| #endif | | | |
| | | | |
| /* Public defines */ | | /* Public defines */ | |
| #define MEMCACHED_DEFAULT_PORT 11211 | | #define MEMCACHED_DEFAULT_PORT 11211 | |
| #define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */ | | #define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */ | |
| #define MEMCACHED_MAX_BUFFER 8196 | | #define MEMCACHED_MAX_BUFFER 8196 | |
| #define MEMCACHED_MAX_HOST_LENGTH 64 | | #define MEMCACHED_MAX_HOST_LENGTH 64 | |
| #define MEMCACHED_MAX_HOST_SORT_LENGTH 86 /* Used for Ketama */ | | #define MEMCACHED_MAX_HOST_SORT_LENGTH 86 /* Used for Ketama */ | |
| #define MEMCACHED_POINTS_PER_SERVER 100 | | #define MEMCACHED_POINTS_PER_SERVER 100 | |
| #define MEMCACHED_POINTS_PER_SERVER_KETAMA 160 | | #define MEMCACHED_POINTS_PER_SERVER_KETAMA 160 | |
| #define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This wo
uld then set max hosts to 100 */ | | #define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This wo
uld then set max hosts to 100 */ | |
| #define MEMCACHED_STRIDE 4 | | #define MEMCACHED_STRIDE 4 | |
| | | | |
| skipping to change at line 108 | | skipping to change at line 104 | |
| MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, | | MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, | |
| MEMCACHED_BEHAVIOR_SND_TIMEOUT, | | MEMCACHED_BEHAVIOR_SND_TIMEOUT, | |
| MEMCACHED_BEHAVIOR_RCV_TIMEOUT, | | MEMCACHED_BEHAVIOR_RCV_TIMEOUT, | |
| MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, | | MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, | |
| MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK, | | MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK, | |
| MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK, | | MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK, | |
| MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH, | | MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH, | |
| MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY, | | MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY, | |
| MEMCACHED_BEHAVIOR_NOREPLY, | | MEMCACHED_BEHAVIOR_NOREPLY, | |
| MEMCACHED_BEHAVIOR_USE_UDP, | | MEMCACHED_BEHAVIOR_USE_UDP, | |
|
| MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS | | MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS, | |
| | | MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS | |
| } memcached_behavior; | | } memcached_behavior; | |
| | | | |
| typedef enum { | | typedef enum { | |
|
| MEMCACHED_CALLBACK_PREFIX_KEY, | | MEMCACHED_CALLBACK_PREFIX_KEY = 0, | |
| MEMCACHED_CALLBACK_USER_DATA, | | MEMCACHED_CALLBACK_USER_DATA = 1, | |
| MEMCACHED_CALLBACK_CLEANUP_FUNCTION, | | MEMCACHED_CALLBACK_CLEANUP_FUNCTION = 2, | |
| MEMCACHED_CALLBACK_CLONE_FUNCTION, | | MEMCACHED_CALLBACK_CLONE_FUNCTION = 3, | |
| MEMCACHED_CALLBACK_MALLOC_FUNCTION, | | #ifdef MEMCACHED_ENABLE_DEPRECATED | |
| MEMCACHED_CALLBACK_REALLOC_FUNCTION, | | MEMCACHED_CALLBACK_MALLOC_FUNCTION = 4, | |
| MEMCACHED_CALLBACK_FREE_FUNCTION, | | MEMCACHED_CALLBACK_REALLOC_FUNCTION = 5, | |
| MEMCACHED_CALLBACK_GET_FAILURE, | | MEMCACHED_CALLBACK_FREE_FUNCTION = 6, | |
| MEMCACHED_CALLBACK_DELETE_TRIGGER | | #endif | |
| | | MEMCACHED_CALLBACK_GET_FAILURE = 7, | |
| | | MEMCACHED_CALLBACK_DELETE_TRIGGER = 8 | |
| } memcached_callback; | | } memcached_callback; | |
| | | | |
| typedef enum { | | typedef enum { | |
| MEMCACHED_HASH_DEFAULT= 0, | | MEMCACHED_HASH_DEFAULT= 0, | |
| MEMCACHED_HASH_MD5, | | MEMCACHED_HASH_MD5, | |
| MEMCACHED_HASH_CRC, | | MEMCACHED_HASH_CRC, | |
| MEMCACHED_HASH_FNV1_64, | | MEMCACHED_HASH_FNV1_64, | |
| MEMCACHED_HASH_FNV1A_64, | | MEMCACHED_HASH_FNV1A_64, | |
| MEMCACHED_HASH_FNV1_32, | | MEMCACHED_HASH_FNV1_32, | |
| MEMCACHED_HASH_FNV1A_32, | | MEMCACHED_HASH_FNV1A_32, | |
| | | | |
| skipping to change at line 143 | | skipping to change at line 142 | |
| MEMCACHED_HASH_JENKINS | | MEMCACHED_HASH_JENKINS | |
| } memcached_hash; | | } memcached_hash; | |
| | | | |
| typedef enum { | | typedef enum { | |
| MEMCACHED_CONNECTION_UNKNOWN, | | MEMCACHED_CONNECTION_UNKNOWN, | |
| MEMCACHED_CONNECTION_TCP, | | MEMCACHED_CONNECTION_TCP, | |
| MEMCACHED_CONNECTION_UDP, | | MEMCACHED_CONNECTION_UDP, | |
| MEMCACHED_CONNECTION_UNIX_SOCKET | | MEMCACHED_CONNECTION_UNIX_SOCKET | |
| } memcached_connection; | | } memcached_connection; | |
| | | | |
|
| #ifdef __cplusplus | | | |
| } | | | |
| #endif | | | |
| | | | |
| #endif /* __MEMCACHED_CONSTANTS_H__ */ | | #endif /* __MEMCACHED_CONSTANTS_H__ */ | |
| | | | |
End of changes. 4 change blocks. |
| 18 lines changed or deleted | | 13 lines changed or added | |
|
| memcached_get.h | | memcached_get.h | |
| | | | |
| skipping to change at line 17 | | skipping to change at line 17 | |
| */ | | */ | |
| | | | |
| #ifndef __MEMCACHED_GET_H__ | | #ifndef __MEMCACHED_GET_H__ | |
| #define __MEMCACHED_GET_H__ | | #define __MEMCACHED_GET_H__ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /* Public defines */ | | /* Public defines */ | |
|
| | | LIBMEMCACHED_API | |
| char *memcached_get(memcached_st *ptr, | | char *memcached_get(memcached_st *ptr, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| size_t *value_length, | | size_t *value_length, | |
| uint32_t *flags, | | uint32_t *flags, | |
| memcached_return *error); | | memcached_return *error); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_mget(memcached_st *ptr, | | memcached_return memcached_mget(memcached_st *ptr, | |
| char **keys, size_t *key_length, | | char **keys, size_t *key_length, | |
| unsigned int number_of_keys); | | unsigned int number_of_keys); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| char *memcached_get_by_key(memcached_st *ptr, | | char *memcached_get_by_key(memcached_st *ptr, | |
| const char *master_key, size_t master_key_length
, | | const char *master_key, size_t master_key_length
, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| size_t *value_length, | | size_t *value_length, | |
| uint32_t *flags, | | uint32_t *flags, | |
| memcached_return *error); | | memcached_return *error); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_mget_by_key(memcached_st *ptr, | | memcached_return memcached_mget_by_key(memcached_st *ptr, | |
| const char *master_key, size_t | | const char *master_key, size_t | |
| master_key_length, | | master_key_length, | |
| char **keys, | | char **keys, | |
| size_t *key_length, | | size_t *key_length, | |
| unsigned int number_of_keys); | | unsigned int number_of_keys); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| char *memcached_fetch(memcached_st *ptr, | | char *memcached_fetch(memcached_st *ptr, | |
| char *key, size_t *key_length, | | char *key, size_t *key_length, | |
| size_t *value_length, uint32_t *flags, | | size_t *value_length, uint32_t *flags, | |
| memcached_return *error); | | memcached_return *error); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_result_st *memcached_fetch_result(memcached_st *ptr, | | memcached_result_st *memcached_fetch_result(memcached_st *ptr, | |
| memcached_result_st *result, | | memcached_result_st *result, | |
| memcached_return *error); | | memcached_return *error); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* __MEMCACHED_GET_H__ */ | | #endif /* __MEMCACHED_GET_H__ */ | |
| | | | |
End of changes. 6 change blocks. |
| 0 lines changed or deleted | | 6 lines changed or added | |
|
| memcached_server.h | | memcached_server.h | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| char write_buffer[MEMCACHED_MAX_BUFFER]; | | char write_buffer[MEMCACHED_MAX_BUFFER]; | |
| char hostname[MEMCACHED_MAX_HOST_LENGTH]; | | char hostname[MEMCACHED_MAX_HOST_LENGTH]; | |
| }; | | }; | |
| | | | |
| #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 | |
| memcached_return memcached_server_cursor(memcached_st *ptr, | | memcached_return memcached_server_cursor(memcached_st *ptr, | |
| memcached_server_function *callbac
k, | | memcached_server_function *callbac
k, | |
| void *context, | | void *context, | |
| unsigned int number_of_callbacks); | | unsigned int number_of_callbacks); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_server_st *memcached_server_by_key(memcached_st *ptr, const char
*key, | | memcached_server_st *memcached_server_by_key(memcached_st *ptr, const char
*key, | |
| size_t key_length, memcached_r
eturn *error); | | size_t key_length, memcached_r
eturn *error); | |
| | | | |
| /* These should not currently be used by end users */ | | /* These should not currently be used by end users */ | |
|
| | | /* TODO: Is the above comment valid? If so, how can we unit test these if t | |
| | | hey | |
| | | * aren't exported. If not, we should remove the comment */ | |
| | | LIBMEMCACHED_API | |
| memcached_server_st *memcached_server_create(memcached_st *memc, memcached_
server_st *ptr); | | memcached_server_st *memcached_server_create(memcached_st *memc, memcached_
server_st *ptr); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_server_st *memcached_server_create_with(memcached_st *memc, memca
ched_server_st *host, | | memcached_server_st *memcached_server_create_with(memcached_st *memc, memca
ched_server_st *host, | |
| const char *hostname, uns
igned int port, | | const char *hostname, uns
igned int port, | |
| uint32_t weight, memcache
d_connection type); | | uint32_t weight, memcache
d_connection type); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| void memcached_server_free(memcached_server_st *ptr); | | void memcached_server_free(memcached_server_st *ptr); | |
|
| | | LIBMEMCACHED_API | |
| memcached_server_st *memcached_server_clone(memcached_server_st *clone, mem
cached_server_st *ptr); | | memcached_server_st *memcached_server_clone(memcached_server_st *clone, mem
cached_server_st *ptr); | |
|
| | | LIBMEMCACHED_API | |
| memcached_analysis_st *memcached_analyze(memcached_st *memc, memcached_stat
_st *stat, | | memcached_analysis_st *memcached_analyze(memcached_st *memc, memcached_stat
_st *stat, | |
| memcached_return *error); | | memcached_return *error); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| | | memcached_return memcached_server_remove(memcached_server_st *st_ptr); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* __MEMCACHED_SERVER_H__ */ | | #endif /* __MEMCACHED_SERVER_H__ */ | |
| | | | |
End of changes. 8 change blocks. |
| 0 lines changed or deleted | | 13 lines changed or added | |
|
| memcached_storage.h | | memcached_storage.h | |
| | | | |
| skipping to change at line 12 | | skipping to change at line 12 | |
| * Summary: Storage functions for libmemcached | | * Summary: Storage functions for libmemcached | |
| * | | * | |
| * Copy: See Copyright for the status of this software. | | * Copy: See Copyright for the status of this software. | |
| * | | * | |
| * Author: Brian Aker | | * Author: Brian Aker | |
| */ | | */ | |
| | | | |
| #ifndef __MEMCACHED_STORAGE_H__ | | #ifndef __MEMCACHED_STORAGE_H__ | |
| #define __MEMCACHED_STORAGE_H__ | | #define __MEMCACHED_STORAGE_H__ | |
| | | | |
|
| | | #include "libmemcached/memcached_types.h" | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /* All of the functions for adding data to the server */ | | /* All of the functions for adding data to the server */ | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_set(memcached_st *ptr, const char *key, size_t k
ey_length, | | memcached_return memcached_set(memcached_st *ptr, const char *key, size_t k
ey_length, | |
| const char *value, size_t value_length, | | const char *value, size_t value_length, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_add(memcached_st *ptr, const char *key, size_t k
ey_length, | | memcached_return memcached_add(memcached_st *ptr, const char *key, size_t k
ey_length, | |
| const char *value, size_t value_length, | | const char *value, size_t value_length, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_replace(memcached_st *ptr, const char *key, size
_t key_length, | | memcached_return memcached_replace(memcached_st *ptr, const char *key, size
_t key_length, | |
| const char *value, size_t value_length, | | const char *value, size_t value_length, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_append(memcached_st *ptr, | | memcached_return memcached_append(memcached_st *ptr, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| const char *value, size_t value_length, | | const char *value, size_t value_length, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_prepend(memcached_st *ptr, | | memcached_return memcached_prepend(memcached_st *ptr, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| const char *value, size_t value_length, | | const char *value, size_t value_length, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_cas(memcached_st *ptr, | | memcached_return memcached_cas(memcached_st *ptr, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| const char *value, size_t value_length, | | const char *value, size_t value_length, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags, | | uint32_t flags, | |
| uint64_t cas); | | uint64_t cas); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_set_by_key(memcached_st *ptr, | | memcached_return memcached_set_by_key(memcached_st *ptr, | |
| const char *master_key, size_t master
_key_length, | | const char *master_key, size_t master
_key_length, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| const char *value, size_t value_lengt
h, | | const char *value, size_t value_lengt
h, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_add_by_key(memcached_st *ptr, | | memcached_return memcached_add_by_key(memcached_st *ptr, | |
| const char *master_key, size_t master
_key_length, | | const char *master_key, size_t master
_key_length, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| const char *value, size_t value_lengt
h, | | const char *value, size_t value_lengt
h, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_replace_by_key(memcached_st *ptr, | | memcached_return memcached_replace_by_key(memcached_st *ptr, | |
| const char *master_key, size_t ma
ster_key_length, | | const char *master_key, size_t ma
ster_key_length, | |
| const char *key, size_t key_lengt
h, | | const char *key, size_t key_lengt
h, | |
| const char *value, size_t value_l
ength, | | const char *value, size_t value_l
ength, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_prepend_by_key(memcached_st *ptr, | | memcached_return memcached_prepend_by_key(memcached_st *ptr, | |
| const char *master_key, size_t ma
ster_key_length, | | const char *master_key, size_t ma
ster_key_length, | |
| const char *key, size_t key_lengt
h, | | const char *key, size_t key_lengt
h, | |
| const char *value, size_t value_l
ength, | | const char *value, size_t value_l
ength, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_append_by_key(memcached_st *ptr, | | memcached_return memcached_append_by_key(memcached_st *ptr, | |
| const char *master_key, size_t mas
ter_key_length, | | const char *master_key, size_t mas
ter_key_length, | |
| const char *key, size_t key_length
, | | const char *key, size_t key_length
, | |
| const char *value, size_t value_le
ngth, | | const char *value, size_t value_le
ngth, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags); | | uint32_t flags); | |
| | | | |
|
| | | LIBMEMCACHED_API | |
| memcached_return memcached_cas_by_key(memcached_st *ptr, | | memcached_return memcached_cas_by_key(memcached_st *ptr, | |
| const char *master_key, size_t master
_key_length, | | const char *master_key, size_t master
_key_length, | |
| const char *key, size_t key_length, | | const char *key, size_t key_length, | |
| const char *value, size_t value_lengt
h, | | const char *value, size_t value_lengt
h, | |
| time_t expiration, | | time_t expiration, | |
| uint32_t flags, | | uint32_t flags, | |
| uint64_t cas); | | uint64_t cas); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| | | | |
End of changes. 13 change blocks. |
| 0 lines changed or deleted | | 14 lines changed or added | |
|
| memcached_types.h | | memcached_types.h | |
| | | | |
| skipping to change at line 28 | | skipping to change at line 28 | |
| typedef struct memcached_analysis_st memcached_analysis_st; | | typedef struct memcached_analysis_st memcached_analysis_st; | |
| typedef struct memcached_result_st memcached_result_st; | | typedef struct memcached_result_st memcached_result_st; | |
| typedef struct memcached_string_st memcached_string_st; | | typedef struct memcached_string_st memcached_string_st; | |
| typedef struct memcached_server_st memcached_server_st; | | typedef struct memcached_server_st memcached_server_st; | |
| typedef struct memcached_continuum_item_st memcached_continuum_item_st; | | typedef struct memcached_continuum_item_st memcached_continuum_item_st; | |
| typedef memcached_return (*memcached_clone_func)(memcached_st *parent, memc
ached_st *clone); | | typedef memcached_return (*memcached_clone_func)(memcached_st *parent, memc
ached_st *clone); | |
| typedef memcached_return (*memcached_cleanup_func)(memcached_st *ptr); | | typedef memcached_return (*memcached_cleanup_func)(memcached_st *ptr); | |
| typedef void (*memcached_free_function)(memcached_st *ptr, void *mem); | | typedef void (*memcached_free_function)(memcached_st *ptr, void *mem); | |
| typedef void *(*memcached_malloc_function)(memcached_st *ptr, const size_t
size); | | typedef void *(*memcached_malloc_function)(memcached_st *ptr, const size_t
size); | |
| typedef void *(*memcached_realloc_function)(memcached_st *ptr, void *mem, c
onst size_t size); | | typedef void *(*memcached_realloc_function)(memcached_st *ptr, void *mem, c
onst size_t size); | |
|
| | | typedef void *(*memcached_calloc_function)(memcached_st *ptr, size_t nelem,
const size_t elsize); | |
| typedef memcached_return (*memcached_execute_function)(memcached_st *ptr, m
emcached_result_st *result, void *context); | | typedef memcached_return (*memcached_execute_function)(memcached_st *ptr, m
emcached_result_st *result, void *context); | |
| typedef memcached_return (*memcached_server_function)(memcached_st *ptr, me
mcached_server_st *server, void *context); | | typedef memcached_return (*memcached_server_function)(memcached_st *ptr, me
mcached_server_st *server, void *context); | |
| typedef memcached_return (*memcached_trigger_key)(memcached_st *ptr, | | typedef memcached_return (*memcached_trigger_key)(memcached_st *ptr, | |
| const char *key, size_t k
ey_length, | | const char *key, size_t k
ey_length, | |
| memcached_result_st *resu
lt); | | memcached_result_st *resu
lt); | |
| typedef memcached_return (*memcached_trigger_delete_key)(memcached_st *ptr, | | typedef memcached_return (*memcached_trigger_delete_key)(memcached_st *ptr, | |
| const char *key, s
ize_t key_length); | | const char *key, s
ize_t key_length); | |
| | | | |
| typedef memcached_return (*memcached_dump_func)(memcached_st *ptr, | | typedef memcached_return (*memcached_dump_func)(memcached_st *ptr, | |
| const char *key, size_t key
_length, void *context); | | const char *key, size_t key
_length, void *context); | |
| | | | |
End of changes. 1 change blocks. |
| 0 lines changed or deleted | | 1 lines changed or added | |
|
| memcached_watchpoint.h | | memcached_watchpoint.h | |
| /* | | /* | |
| * Summary: Localized copy of WATCHPOINT debug symbols | | * Summary: Localized copy of WATCHPOINT debug symbols | |
| * | | * | |
| * Copy: See Copyright for the status of this software. | | * Copy: See Copyright for the status of this software. | |
| * | | * | |
| * Author: Brian Aker | | * Author: Brian Aker | |
| */ | | */ | |
| | | | |
|
| #ifndef __MEMCACHED_WATCHPOINT_H__ | | #ifndef LIBMEMCACHED_MEMCACHED_WATCHPOINT_H | |
| #define __MEMCACHED_WATCHPOINT_H__ | | #define LIBMEMCACHED_MEMCACHED_WATCHPOINT_H | |
| | | | |
| #ifdef __cplusplus | | | |
| extern "C" { | | | |
| #endif | | | |
| | | | |
| /* Some personal debugging functions */ | | /* Some personal debugging functions */ | |
|
| #if defined(MEMCACHED_INTERNAL) && defined(HAVE_DEBUG) | | #if defined(DEBUG) | |
| | | | |
| #include <assert.h> | | #include <assert.h> | |
| | | | |
| #define WATCHPOINT fprintf(stderr, "\nWATCHPOINT %s:%d (%s)\n", __FILE__, _
_LINE__,__func__);fflush(stdout); | | #define WATCHPOINT fprintf(stderr, "\nWATCHPOINT %s:%d (%s)\n", __FILE__, _
_LINE__,__func__);fflush(stdout); | |
| #define WATCHPOINT_ERROR(A) fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FI
LE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); | | #define WATCHPOINT_ERROR(A) fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FI
LE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); | |
| #define WATCHPOINT_IFERROR(A) if(A != MEMCACHED_SUCCESS)fprintf(stderr, "\n
WATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));ff
lush(stdout); | | #define WATCHPOINT_IFERROR(A) if(A != MEMCACHED_SUCCESS)fprintf(stderr, "\n
WATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));ff
lush(stdout); | |
| #define WATCHPOINT_STRING(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n"
, __FILE__, __LINE__,__func__,A);fflush(stdout); | | #define WATCHPOINT_STRING(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n"
, __FILE__, __LINE__,__func__,A);fflush(stdout); | |
| #define WATCHPOINT_STRING_LENGTH(A,B) fprintf(stderr, "\nWATCHPOINT %s:%d (
%s) %.*s\n", __FILE__, __LINE__,__func__,(int)B,A);fflush(stdout); | | #define WATCHPOINT_STRING_LENGTH(A,B) fprintf(stderr, "\nWATCHPOINT %s:%d (
%s) %.*s\n", __FILE__, __LINE__,__func__,(int)B,A);fflush(stdout); | |
| #define WATCHPOINT_NUMBER(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %zu\n
", __FILE__, __LINE__,__func__,(size_t)(A));fflush(stdout); | | #define WATCHPOINT_NUMBER(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %zu\n
", __FILE__, __LINE__,__func__,(size_t)(A));fflush(stdout); | |
| #define WATCHPOINT_ERRNO(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n",
__FILE__, __LINE__,__func__, strerror(A));fflush(stdout); | | #define WATCHPOINT_ERRNO(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n",
__FILE__, __LINE__,__func__, strerror(A));fflush(stdout); | |
| #define WATCHPOINT_ASSERT_PRINT(A,B,C) if(!(A)){fprintf(stderr, "\nWATCHPOI
NT ASSERT %s:%d (%s) ", __FILE__, __LINE__,__func__);fprintf(stderr, (B),(C
));fprintf(stderr,"\n");fflush(stdout);}assert((A)); | | #define WATCHPOINT_ASSERT_PRINT(A,B,C) if(!(A)){fprintf(stderr, "\nWATCHPOI
NT ASSERT %s:%d (%s) ", __FILE__, __LINE__,__func__);fprintf(stderr, (B),(C
));fprintf(stderr,"\n");fflush(stdout);}assert((A)); | |
| | | | |
| skipping to change at line 39 | | skipping to change at line 36 | |
| #else | | #else | |
| #define WATCHPOINT | | #define WATCHPOINT | |
| #define WATCHPOINT_ERROR(A) | | #define WATCHPOINT_ERROR(A) | |
| #define WATCHPOINT_IFERROR(A) | | #define WATCHPOINT_IFERROR(A) | |
| #define WATCHPOINT_STRING(A) | | #define WATCHPOINT_STRING(A) | |
| #define WATCHPOINT_NUMBER(A) | | #define WATCHPOINT_NUMBER(A) | |
| #define WATCHPOINT_ERRNO(A) | | #define WATCHPOINT_ERRNO(A) | |
| #define WATCHPOINT_ASSERT_PRINT(A,B,C) | | #define WATCHPOINT_ASSERT_PRINT(A,B,C) | |
| #define WATCHPOINT_ASSERT(A) | | #define WATCHPOINT_ASSERT(A) | |
| | | | |
|
| #endif /* MEMCACHED_INTERNAL && HAVE_DEBUG */ | | #endif /* DEBUG */ | |
| | | | |
| #ifdef __cplusplus | | | |
| } | | | |
| #endif | | | |
| | | | |
|
| #endif /* __MEMCACHED_WATCHPOINT_H__ */ | | #endif /* LIBMEMCACHED_MEMCACHED_WATCHPOINT_H */ | |
| | | | |
End of changes. 4 change blocks. |
| 12 lines changed or deleted | | 5 lines changed or added | |
|