projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Adding test, showing off how to add a custom function to libmemcached.
[m6w6/libmemcached]
/
libmemcached
/
common.h
diff --git
a/libmemcached/common.h
b/libmemcached/common.h
index 1e1db2f5e0dd2028c8f9a589a34bf19080a3bc3d..719a3a945e451e9be219486482820278c55f70e3 100644
(file)
--- a/
libmemcached/common.h
+++ b/
libmemcached/common.h
@@
-13,8
+13,8
@@
Common include file for libmemached
*/
Common include file for libmemached
*/
-#ifndef
LIBMEMCACHED_COMMON_H
-#define
LIBMEMCACHED_COMMON_H
+#ifndef
__LIBMEMCACHED_COMMON_H__
+#define
__LIBMEMCACHED_COMMON_H__
#include "config.h"
#include "config.h"
@@
-57,6
+57,7
@@
typedef struct memcached_server_st memcached_server_instance_st;
/* These are private not to be installed headers */
typedef struct memcached_server_st memcached_server_instance_st;
/* These are private not to be installed headers */
+#include "libmemcached/do.h"
#include "libmemcached/io.h"
#include "libmemcached/internal.h"
#include "libmemcached/libmemcached_probes.h"
#include "libmemcached/io.h"
#include "libmemcached/internal.h"
#include "libmemcached/libmemcached_probes.h"
@@
-95,6
+96,10
@@
typedef enum {
#define SMALL_STRING_LEN 1024
#define HUGE_STRING_LEN 8196
#define SMALL_STRING_LEN 1024
#define HUGE_STRING_LEN 8196
+#ifdef __cplusplus
+extern "C" {
+#endif
+
LIBMEMCACHED_LOCAL
memcached_return_t memcached_connect(memcached_server_instance_st *ptr);
LIBMEMCACHED_LOCAL
LIBMEMCACHED_LOCAL
memcached_return_t memcached_connect(memcached_server_instance_st *ptr);
LIBMEMCACHED_LOCAL
@@
-118,9
+123,6
@@
memcached_return_t run_distribution(memcached_st *ptr);
#define memcached_set_allocated(__object, __value) ((__object)->options.is_allocated(= (__value))
#define memcached_set_allocated(__object, __value) ((__object)->options.is_allocated(= (__value))
-LIBMEMCACHED_LOCAL
-memcached_return_t memcached_do(memcached_server_instance_st *ptr, const void *commmand,
- size_t command_length, uint8_t with_flush);
LIBMEMCACHED_LOCAL
memcached_return_t value_fetch(memcached_server_instance_st *ptr,
char *buffer,
LIBMEMCACHED_LOCAL
memcached_return_t value_fetch(memcached_server_instance_st *ptr,
char *buffer,
@@
-217,5
+219,8
@@
static inline void *libmemcached_calloc(const memcached_st *ptr, size_t nelem, s
return ptr->allocators.calloc(ptr, nelem, size, ptr->allocators.context);
}
return ptr->allocators.calloc(ptr, nelem, size, ptr->allocators.context);
}
+#ifdef __cplusplus
+}
+#endif
-#endif /*
LIBMEMCACHED_COMMON_H
*/
+#endif /*
__LIBMEMCACHED_COMMON_H__
*/