projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
memcached_set_encoding_key: header mixup
[awesomized/libmemcached]
/
src
/
libmemcached
/
encoding_key.cc
diff --git
a/src/libmemcached/encoding_key.cc
b/src/libmemcached/encoding_key.cc
index 1e17d507a44b67b67756dcce0088d48283f17d43..714dd1cc49e96724896c156f8078a2530b9bba44 100644
(file)
--- a/
src/libmemcached/encoding_key.cc
+++ b/
src/libmemcached/encoding_key.cc
@@
-1,5
+1,5
@@
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
+ *
* Libmemcached library
*
* Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/
* Libmemcached library
*
* Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/
@@
-35,22
+35,13
@@
*
*/
*
*/
-#include <libmemcached/common.h>
-#include <libmemcached/assert.hpp>
-
-static void _set_encoding_key(Memcached& memc, const char *key, size_t key_length)
-{
- hashkit_key(&memc.hashkit, key, key_length);
-}
+#include "libmemcached/common.h"
memcached_return_t memcached_set_encoding_key(memcached_st* shell, const char *key, size_t key_length)
{
memcached_return_t memcached_set_encoding_key(memcached_st* shell, const char *key, size_t key_length)
{
- Memcached* memc= memcached2Memcached(shell);
- if (memc)
- {
- _set_encoding_key(*memc, key, key_length);
- return MEMCACHED_SUCCESS;
+ if (!shell) {
+ return MEMCACHED_INVALID_ARGUMENTS;
}
}
-
- return MEMCACHED_
INVALID_ARGUMENT
S;
+ hashkit_key(&shell->hashkit, key, key_length);
+ return MEMCACHED_
SUCCES
S;
}
}