memcached.h | memcached.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
* 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_H__ | #ifndef __MEMCACHED_H__ | |||
#define __MEMCACHED_H__ | #define __MEMCACHED_H__ | |||
#include <stdlib.h> | #include <stdlib.h> | |||
#include <stdint.h> | #include <stdint.h> | |||
#include <sys/types.h> | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
typedef struct memcached_st memcached_st; | typedef struct memcached_st memcached_st; | |||
typedef struct memcached_stat_st memcached_stat_st; | typedef struct memcached_stat_st memcached_stat_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; | |||
skipping to change at line 142 | skipping to change at line 143 | |||
int my_errno; | int my_errno; | |||
unsigned long long flags; | unsigned long long flags; | |||
int send_size; | int send_size; | |||
int recv_size; | int recv_size; | |||
memcached_return warning; /* Future Use */ | memcached_return warning; /* Future Use */ | |||
}; | }; | |||
/* Public API */ | /* Public API */ | |||
memcached_st *memcached_create(memcached_st *ptr); | memcached_st *memcached_create(memcached_st *ptr); | |||
void memcached_free(memcached_st *ptr); | void memcached_free(memcached_st *ptr); | |||
memcached_st *memcached_clone(memcached_st *clone, memcached_st *ptr); | ||||
memcached_return memcached_delete(memcached_st *ptr, char *key, size_t key_ length, | memcached_return memcached_delete(memcached_st *ptr, char *key, size_t key_ length, | |||
time_t expiration); | time_t expiration); | |||
memcached_return memcached_increment(memcached_st *ptr, | memcached_return memcached_increment(memcached_st *ptr, | |||
char *key, size_t key_length, | char *key, size_t key_length, | |||
unsigned int offset, | unsigned int offset, | |||
unsigned int *value); | unsigned int *value); | |||
memcached_return memcached_decrement(memcached_st *ptr, | memcached_return memcached_decrement(memcached_st *ptr, | |||
char *key, size_t key_length, | char *key, size_t key_length, | |||
unsigned int offset, | unsigned int offset, | |||
skipping to change at line 213 | skipping to change at line 215 | |||
memcached_return *error); | memcached_return *error); | |||
unsigned int memcached_server_list_count(memcached_server_st *ptr); | 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(char *server_strings); | |||
char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, | char *memcached_stat_get_value(memcached_st *ptr, memcached_stat_st *stat, | |||
char *key, memcached_return *error); | char *key, memcached_return *error); | |||
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); | |||
/* Some personal debugging functions */ | /* Some personal debugging functions */ | |||
#define WATCHPOINT printf("\nWATCHPOINT %s:%d (%s)\n", __FILE__, __LINE__,_ | #ifdef HAVE_DEBUG | |||
_func__);fflush(stdout); | #define WATCHPOINT fprintf(stderr, "\nWATCHPOINT %s:%d (%s)\n", __FILE__, _ | |||
#define WATCHPOINT_ERROR(A) printf("\nWATCHPOINT %s:%d %s\n", __FILE__, __L | _LINE__,__func__);fflush(stdout); | |||
INE__, memcached_strerror(NULL, A));fflush(stdout); | #define WATCHPOINT_ERROR(A) fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FI | |||
#define WATCHPOINT_STRING(A) printf("\nWATCHPOINT %s:%d (%s) %s\n", __FILE_ | LE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); | |||
_, __LINE__,__func__,A);fflush(stdout); | #define WATCHPOINT_STRING(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n" | |||
#define WATCHPOINT_NUMBER(A) printf("\nWATCHPOINT %s:%d (%s) %d\n", __FILE_ | , __FILE__, __LINE__,__func__,A);fflush(stdout); | |||
_, __LINE__,__func__,A);fflush(stdout); | #define WATCHPOINT_NUMBER(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %zu\n | |||
#define WATCHPOINT_ERRNO(A) printf("\nWATCHPOINT %s:%d (%s) %s\n", __FILE__ | ", __FILE__, __LINE__,__func__,(size_t)(A));fflush(stdout); | |||
, __LINE__,__func__, strerror(A));A= 0;fflush(stdout); | #define WATCHPOINT_ERRNO(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n", | |||
__FILE__, __LINE__,__func__, strerror(A));A= 0;fflush(stdout); | ||||
#define WATCHPOINT_ASSERT(A) assert((A)); | ||||
#else | ||||
/* | ||||
#define WATCHPOINT { 1; }; | ||||
#define WATCHPOINT_ERROR(A) { 1; }; | ||||
#define WATCHPOINT_STRING(A) { 1; }; | ||||
#define WATCHPOINT_NUMBER(A) { 1; }; | ||||
#define WATCHPOINT_ERRNO(A) { 1; }; | ||||
#define WATCHPOINT_ASSERT(A) { 1; }; | ||||
*/ | ||||
#define WATCHPOINT | ||||
#define WATCHPOINT_ERROR(A) | ||||
#define WATCHPOINT_STRING(A) | ||||
#define WATCHPOINT_NUMBER(A) | ||||
#define WATCHPOINT_ERRNO(A) | ||||
#define WATCHPOINT_ASSERT(A) | ||||
#endif | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif /* __MEMCACHED_H__ */ | #endif /* __MEMCACHED_H__ */ | |||
End of changes. 3 change blocks. | ||||
10 lines changed or deleted | 30 lines changed or added | |||