From: Trond Norbye Date: Fri, 5 Feb 2010 13:39:03 +0000 (+0100) Subject: Set C linkage for the function pointers X-Git-Tag: 0.40~57^2~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=166a320c4ac277960a3dee1882a4c5bdeffbd2a1;p=awesomized%2Flibmemcached Set C linkage for the function pointers --- diff --git a/libmemcached/types.h b/libmemcached/types.h index c262b58d..deaf2f49 100644 --- a/libmemcached/types.h +++ b/libmemcached/types.h @@ -22,6 +22,11 @@ typedef struct memcached_callback_st memcached_callback_st; typedef struct memcached_string_st memcached_string_st; typedef struct memcached_continuum_item_st memcached_continuum_item_st; + +#ifdef __cplusplus +extern "C" { +#endif + typedef memcached_return_t (*memcached_clone_fn)(memcached_st *destination, const memcached_st *source); typedef memcached_return_t (*memcached_cleanup_fn)(const memcached_st *ptr); @@ -33,6 +38,7 @@ typedef void *(*memcached_malloc_fn)(const memcached_st *ptr, const size_t size, typedef void *(*memcached_realloc_fn)(const memcached_st *ptr, void *mem, const size_t size, void *context); typedef void *(*memcached_calloc_fn)(const memcached_st *ptr, size_t nelem, const size_t elsize, void *context); + typedef memcached_return_t (*memcached_execute_fn)(const memcached_st *ptr, memcached_result_st *result, void *context); typedef memcached_return_t (*memcached_server_fn)(const memcached_st *ptr, memcached_server_st *server, void *context); @@ -50,7 +56,10 @@ typedef memcached_return_t (*memcached_dump_fn)(const memcached_st *ptr, size_t key_length, void *context); - +#ifdef __cplusplus +} +#endif + /** @note The following definitions are just here for backwards compatibility. */