X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fcommon.h;h=40f45111826a9f840212990c67f72b10941a5305;hb=56baf2c0a1a9a6111637dffeea16f997307320ee;hp=ec58fd8e2cc9c4b89cdb34c28c991cce11b66f03;hpb=ae6bc7501efd5aeaaee92dabe2da0ec2d1625c5b;p=m6w6%2Flibmemcached diff --git a/libmemcached/common.h b/libmemcached/common.h index ec58fd8e..40f45111 100644 --- a/libmemcached/common.h +++ b/libmemcached/common.h @@ -44,27 +44,24 @@ #include +#ifdef __cplusplus +#include +#include +#include +#include +#include +#else #include #include #include -#include -#include -#include -#include -#include -#include -#include -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif +#include #endif +#include +#include +#include +#include +#include #include #include @@ -91,8 +88,10 @@ memcached_return_t memcached_server_execute(memcached_st *ptr, /* These are private not to be installed headers */ +#include +#include #include -#include +#include #include #include #include @@ -178,26 +177,6 @@ static inline memcached_return_t memcached_validate_key_length(size_t key_length return MEMCACHED_SUCCESS; } -static inline void libmemcached_free(const memcached_st *ptr, void *mem) -{ - ptr->allocators.free(ptr, mem, ptr->allocators.context); -} - -static inline void *libmemcached_malloc(const memcached_st *ptr, const size_t size) -{ - return ptr->allocators.malloc(ptr, size, ptr->allocators.context); -} - -static inline void *libmemcached_realloc(const memcached_st *ptr, void *mem, const size_t size) -{ - return ptr->allocators.realloc(ptr, mem, size, ptr->allocators.context); -} - -static inline void *libmemcached_calloc(const memcached_st *ptr, size_t nelem, size_t size) -{ - return ptr->allocators.calloc(ptr, nelem, size, ptr->allocators.context); -} - #ifdef __cplusplus } #endif