projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Sort an option to the correct location.
[m6w6/libmemcached]
/
libmemcached
/
common.h
diff --git
a/libmemcached/common.h
b/libmemcached/common.h
index f30589ca8be21382c9a76daedec406149ff54af5..62a2b1c67411928c8a517d73aec5e2ba675a538c 100644
(file)
--- a/
libmemcached/common.h
+++ b/
libmemcached/common.h
@@
-68,12
+68,19
@@
#include <libmemcached/is.h>
#include <libmemcached/namespace.h>
#include <libmemcached/is.h>
#include <libmemcached/namespace.h>
+#include <libmemcached/server_instance.h>
+
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include "poll/poll.h"
+#endif
+
+
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
-typedef struct memcached_server_st * memcached_server_write_instance_st;
-
typedef memcached_return_t (*memcached_server_execute_fn)(memcached_st *ptr, memcached_server_write_instance_st server, void *context);
LIBMEMCACHED_LOCAL
typedef memcached_return_t (*memcached_server_execute_fn)(memcached_st *ptr, memcached_server_write_instance_st server, void *context);
LIBMEMCACHED_LOCAL
@@
-92,7
+99,11
@@
memcached_return_t memcached_server_execute(memcached_st *ptr,
#include <libmemcached/error.hpp>
#include <libmemcached/memory.h>
#include <libmemcached/io.h>
#include <libmemcached/error.hpp>
#include <libmemcached/memory.h>
#include <libmemcached/io.h>
+#ifdef __cplusplus
+#include <libmemcached/string.hpp>
+#include <libmemcached/io.hpp>
#include <libmemcached/do.hpp>
#include <libmemcached/do.hpp>
+#endif
#include <libmemcached/internal.h>
#include <libmemcached/array.h>
#include <libmemcached/libmemcached_probes.h>
#include <libmemcached/internal.h>
#include <libmemcached/array.h>
#include <libmemcached/libmemcached_probes.h>
@@
-103,15
+114,11
@@
memcached_return_t memcached_server_execute(memcached_st *ptr,
#include <libmemcached/namespace.h>
#ifdef __cplusplus
#include <libmemcached/namespace.h>
#ifdef __cplusplus
+#include <libmemcached/backtrace.hpp>
#include <libmemcached/assert.hpp>
#endif
#include <libmemcached/assert.hpp>
#endif
-/* string value */
-struct memcached_continuum_item_st
-{
- uint32_t index;
- uint32_t value;
-};
+#include <libmemcached/continuum.hpp>
#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
@@
-168,20
+175,24
@@
LIBMEMCACHED_LOCAL
static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool binary)
{
static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool binary)
{
-
unlikely
(key_length == 0)
+
if
(key_length == 0)
{
return MEMCACHED_BAD_KEY_PROVIDED;
}
if (binary)
{
{
return MEMCACHED_BAD_KEY_PROVIDED;
}
if (binary)
{
- unlikely (key_length > 0xffff)
+ if (key_length > 0xffff)
+ {
return MEMCACHED_BAD_KEY_PROVIDED;
return MEMCACHED_BAD_KEY_PROVIDED;
+ }
}
else
{
}
else
{
- unlikely (key_length >= MEMCACHED_MAX_KEY)
+ if (key_length >= MEMCACHED_MAX_KEY)
+ {
return MEMCACHED_BAD_KEY_PROVIDED;
return MEMCACHED_BAD_KEY_PROVIDED;
+ }
}
return MEMCACHED_SUCCESS;
}
return MEMCACHED_SUCCESS;