memcached.h   memcached.h 
skipping to change at line 126 skipping to change at line 126
memcached_malloc_fn malloc; memcached_malloc_fn malloc;
memcached_realloc_fn realloc; memcached_realloc_fn realloc;
void *context; void *context;
} allocators; } allocators;
memcached_clone_fn on_clone; memcached_clone_fn on_clone;
memcached_cleanup_fn on_cleanup; memcached_cleanup_fn on_cleanup;
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;
struct memcached_sasl_st *sasl; struct memcached_sasl_st sasl;
char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE]; char prefix_key[MEMCACHED_PREFIX_KEY_MAX_SIZE];
struct { struct {
bool is_allocated:1; bool is_allocated:1;
} options; } options;
}; };
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 watchpoint.h   watchpoint.h 
skipping to change at line 19 skipping to change at line 19
* *
*/ */
#ifndef __LIBMEMCACHED_WATCHPOINT_H__ #ifndef __LIBMEMCACHED_WATCHPOINT_H__
#define __LIBMEMCACHED_WATCHPOINT_H__ #define __LIBMEMCACHED_WATCHPOINT_H__
/* Some personal debugging functions */ /* Some personal debugging functions */
#if defined(DEBUG) #if defined(DEBUG)
#ifdef TARGET_OS_LINUX #ifdef TARGET_OS_LINUX
static inline void __stack_dump(void) static inline void libmemcached_stack_dump(void)
{ {
void *array[10]; void *array[10];
int size; int size;
char **strings; char **strings;
size= backtrace(array, 10); size= backtrace(array, 10);
strings= backtrace_symbols(array, size); strings= backtrace_symbols(array, size);
fprintf(stderr, "Found %d stack frames.\n", size); fprintf(stderr, "Found %d stack frames.\n", size);
for (int x= 0; x < size; x++) for (int x= 0; x < size; x++)
fprintf(stderr, "%s\n", strings[x]); fprintf(stderr, "%s\n", strings[x]);
free (strings); free (strings);
fflush(stderr); fflush(stderr);
} }
#elif defined(__sun)
#include <ucontext.h>
static inline void libmemcached_stack_dump(void)
{
fflush(stderr);
printstack(fileno(stderr));
}
#else #else
static inline void __stack_dump(void) static inline void libmemcached_stack_dump(void)
{ } { }
#endif // __stack_dump() #endif // libmemcached_stack_dump()
#include <assert.h> #include <assert.h>
#define WATCHPOINT do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s)\n", __FILE __, __LINE__,__func__);fflush(stdout); } while (0) #define WATCHPOINT do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s)\n", __FILE __, __LINE__,__func__);fflush(stdout); } while (0)
#define WATCHPOINT_ERROR(A) do {fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); } while (0 ) #define WATCHPOINT_ERROR(A) do {fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout); } while (0 )
#define WATCHPOINT_IFERROR(A) do { if(A != MEMCACHED_SUCCESS)fprintf(stderr , "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A ));fflush(stdout); } while (0) #define WATCHPOINT_IFERROR(A) do { if(A != MEMCACHED_SUCCESS)fprintf(stderr , "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A ));fflush(stdout); } while (0)
#define WATCHPOINT_STRING(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n", __FILE__, __LINE__,__func__,A);fflush(stdout); } while (0) #define WATCHPOINT_STRING(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n", __FILE__, __LINE__,__func__,A);fflush(stdout); } while (0)
#define WATCHPOINT_STRING_LENGTH(A,B) do { fprintf(stderr, "\nWATCHPOINT %s :%d (%s) %.*s\n", __FILE__, __LINE__,__func__,(int)B,A);fflush(stdout); } w hile (0) #define WATCHPOINT_STRING_LENGTH(A,B) do { fprintf(stderr, "\nWATCHPOINT %s :%d (%s) %.*s\n", __FILE__, __LINE__,__func__,(int)B,A);fflush(stdout); } w hile (0)
#define WATCHPOINT_NUMBER(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %zu\n", __FILE__, __LINE__,__func__,(size_t)(A));fflush(stdout); } while (0 ) #define WATCHPOINT_NUMBER(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %zu\n", __FILE__, __LINE__,__func__,(size_t)(A));fflush(stdout); } while (0 )
#define WATCHPOINT_LABELED_NUMBER(A,B) do { fprintf(stderr, "\nWATCHPOINT % s:%d (%s) %s:%zu\n", __FILE__, __LINE__,__func__,(A),(size_t)(B));fflush(st dout); } while (0) #define WATCHPOINT_LABELED_NUMBER(A,B) do { fprintf(stderr, "\nWATCHPOINT % s:%d (%s) %s:%zu\n", __FILE__, __LINE__,__func__,(A),(size_t)(B));fflush(st dout); } while (0)
#define WATCHPOINT_IF_LABELED_NUMBER(A,B,C) do { if(A) {fprintf(stderr, "\n WATCHPOINT %s:%d (%s) %s:%zu\n", __FILE__, __LINE__,__func__,(B),(size_t)(C ));fflush(stdout);} } while (0) #define WATCHPOINT_IF_LABELED_NUMBER(A,B,C) do { if(A) {fprintf(stderr, "\n WATCHPOINT %s:%d (%s) %s:%zu\n", __FILE__, __LINE__,__func__,(B),(size_t)(C ));fflush(stdout);} } while (0)
#define WATCHPOINT_ERRNO(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) % s\n", __FILE__, __LINE__,__func__, strerror(A));fflush(stdout); } while (0) #define WATCHPOINT_ERRNO(A) do { fprintf(stderr, "\nWATCHPOINT %s:%d (%s) % s\n", __FILE__, __LINE__,__func__, strerror(A));fflush(stdout); } while (0)
#define WATCHPOINT_ASSERT_PRINT(A,B,C) do { if(!(A)){fprintf(stderr, "\nWAT #define WATCHPOINT_ASSERT_PRINT(A,B,C) do { if(!(A)){fprintf(stderr, "\nWAT
CHPOINT ASSERT %s:%d (%s) ", __FILE__, __LINE__,__func__);fprintf(stderr, ( CHPOINT ASSERT %s:%d (%s) ", __FILE__, __LINE__,__func__);fprintf(stderr, (
B),(C));fprintf(stderr,"\n");fflush(stdout); __stack_dump(); } assert((A)); B),(C));fprintf(stderr,"\n");fflush(stdout); libmemcached_stack_dump(); } a
} while (0) ssert((A)); } while (0)
#define WATCHPOINT_ASSERT(A) do { if (! (A)) {__stack_dump();} assert((A)); #define WATCHPOINT_ASSERT(A) do { if (! (A)) {libmemcached_stack_dump();} a
} while (0) ssert((A)); } while (0)
#define WATCHPOINT_ASSERT_INITIALIZED(A) do { if (! (A)) { __stack_dump(); #define WATCHPOINT_ASSERT_INITIALIZED(A) do { if (! (A)) { libmemcached_sta
} assert(memcached_is_initialized((A))); } while (0); ck_dump(); } assert(memcached_is_initialized((A))); } while (0);
#define WATCHPOINT_SET(A) do { A; } while(0); #define WATCHPOINT_SET(A) do { A; } while(0);
#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_LABELED_NUMBER(A,B) #define WATCHPOINT_LABELED_NUMBER(A,B)
 End of changes. 5 change blocks. 
11 lines changed or deleted 20 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/