projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge trunk.
[awesomized/libmemcached]
/
libmemcached
/
common.h
diff --git
a/libmemcached/common.h
b/libmemcached/common.h
index ac300def96249c7c1296be9edefe8f9b1201fb51..d4b2c7df3446660f26307541ec29a3560068767d 100644
(file)
--- a/
libmemcached/common.h
+++ b/
libmemcached/common.h
@@
-100,7
+100,12
@@
memcached_return_t memcached_server_execute(memcached_st *ptr,
#include <libmemcached/byteorder.h>
#include <libmemcached/initialize_query.h>
#include <libmemcached/response.h>
#include <libmemcached/byteorder.h>
#include <libmemcached/initialize_query.h>
#include <libmemcached/response.h>
-#include <libmemcached/prefix_key.h>
+#include <libmemcached/namespace.h>
+
+#ifdef __cplusplus
+#include <libmemcached/backtrace.hpp>
+#include <libmemcached/assert.hpp>
+#endif
/* string value */
struct memcached_continuum_item_st
/* string value */
struct memcached_continuum_item_st
@@
-164,20
+169,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;