projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
bootstrap: add arch linux
[awesomized/libmemcached]
/
libmemcached
/
encoding_key.cc
diff --git
a/libmemcached/encoding_key.cc
b/libmemcached/encoding_key.cc
index 3472029ce6c8a2cd1a228a6f3388ce4b29e21f9c..1e17d507a44b67b67756dcce0088d48283f17d43 100644
(file)
--- a/
libmemcached/encoding_key.cc
+++ b/
libmemcached/encoding_key.cc
@@
-2,7
+2,7
@@
*
* Libmemcached library
*
*
* Libmemcached library
*
- * Copyright (C) 2011 Data Differential, http://datadifferential.com/
+ * Copyright (C) 2011
-2013
Data Differential, http://datadifferential.com/
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-38,18
+38,19
@@
#include <libmemcached/common.h>
#include <libmemcached/assert.hpp>
#include <libmemcached/common.h>
#include <libmemcached/assert.hpp>
-static void _set_encoding_key(
memcached_st& self
, const char *key, size_t key_length)
+static void _set_encoding_key(
Memcached& memc
, const char *key, size_t key_length)
{
{
- hashkit_key(&
self
.hashkit, key, key_length);
+ hashkit_key(&
memc
.hashkit, key, key_length);
}
}
-memcached_return_t memcached_set_encoding_key(memcached_st* s
elf
, const char *key, size_t key_length)
+memcached_return_t memcached_set_encoding_key(memcached_st* s
hell
, const char *key, size_t key_length)
{
{
- if (self == NULL)
+ Memcached* memc= memcached2Memcached(shell);
+ if (memc)
{
{
- return MEMCACHED_INVALID_ARGUMENTS;
+ _set_encoding_key(*memc, key, key_length);
+ return MEMCACHED_SUCCESS;
}
}
- _set_encoding_key(*self, key, key_length);
- return MEMCACHED_SUCCESS;
+ return MEMCACHED_INVALID_ARGUMENTS;
}
}