X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fcommon.h;h=40f45111826a9f840212990c67f72b10941a5305;hb=9fd31c03436acf24c593dc3a77c905eb137ef570;hp=e350149bded5249b572de9638649532f5447d1bb;hpb=de46e62fe493ce152e1804feec0d19d5d0cfaa9f;p=awesomized%2Flibmemcached diff --git a/libmemcached/common.h b/libmemcached/common.h index e350149b..40f45111 100644 --- a/libmemcached/common.h +++ b/libmemcached/common.h @@ -44,37 +44,32 @@ #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 -/* Define this here, which will turn on the visibilty controls while we're - * building libmemcached. - */ -#define BUILDING_LIBMEMCACHED 1 +#include +#include +#include +#include +#include +#include +#include +#include -#include "libmemcached/memcached.h" -#include "libmemcached/watchpoint.h" -#include "libmemcached/is.h" -#include "libmemcached/prefix_key.h" +#ifdef __cplusplus +extern "C" { +#endif typedef struct memcached_server_st * memcached_server_write_instance_st; @@ -87,18 +82,24 @@ LIBMEMCACHED_LOCAL memcached_return_t memcached_server_execute(memcached_st *ptr, memcached_server_execute_fn callback, void *context); +#ifdef __cplusplus +} // extern "C" +#endif /* These are private not to be installed headers */ -#include "libmemcached/io.h" -#include "libmemcached/do.h" -#include "libmemcached/internal.h" -#include "libmemcached/array.h" -#include "libmemcached/libmemcached_probes.h" -#include "libmemcached/memcached/protocol_binary.h" -#include "libmemcached/byteorder.h" -#include "libmemcached/response.h" -#include "libmemcached/prefix_key.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* string value */ struct memcached_continuum_item_st @@ -176,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