struct memcached_array_st
{
- struct memcached_st *root;
+ Memcached *root;
size_t size;
char c_str[];
};
-memcached_array_st *memcached_array_clone(struct memcached_st *memc, const memcached_array_st *original)
+memcached_array_st *memcached_array_clone(Memcached *memc, const memcached_array_st *original)
{
if (original)
{
return NULL;
}
-memcached_array_st *memcached_strcpy(struct memcached_st *memc, const char *str, size_t str_length)
+memcached_array_st *memcached_strcpy(Memcached *memc, const char *str, size_t str_length)
{
assert(memc);
assert(str);
extern "C" {
#endif
-LIBMEMCACHED_LOCAL
-memcached_array_st *memcached_array_clone(struct memcached_st *memc, const memcached_array_st *original);
+memcached_array_st *memcached_array_clone(Memcached* memc, const memcached_array_st *original);
-LIBMEMCACHED_LOCAL
-memcached_array_st *memcached_strcpy(struct memcached_st *memc, const char *str, size_t str_length);
+memcached_array_st *memcached_strcpy(Memcached* memc, const char *str, size_t str_length);
-LIBMEMCACHED_LOCAL
void memcached_array_free(memcached_array_st *array);
-LIBMEMCACHED_LOCAL
size_t memcached_array_size(memcached_array_st *array);
-LIBMEMCACHED_LOCAL
const char *memcached_array_string(memcached_array_st *array);
-LIBMEMCACHED_LOCAL
memcached_string_t memcached_array_to_string(memcached_array_st *array);
-LIBMEMCACHED_LOCAL
bool memcached_array_is_null(memcached_array_st *array);
#ifdef __cplusplus
if (memcached_fatal(rc))
{
- fprintf(stderr, "%s\n", memcached_strerror(NULL, rc));
assert(memcached_last_error(instance->root) != MEMCACHED_SUCCESS);
*value= UINT64_MAX;
}
#define MAX_ERROR_LENGTH 2048
struct memcached_error_t
{
- memcached_st *root;
+ Memcached *root;
uint64_t query_id;
struct memcached_error_t *next;
memcached_return_t rc;
static int error_log_fd= -1;
#endif
-static void _set(memcached_st& memc, memcached_string_t *str, memcached_return_t &rc, const char *at, int local_errno= 0)
+static void _set(Memcached& memc, memcached_string_t *str, memcached_return_t &rc, const char *at, int local_errno= 0)
{
if (memc.error_messages && memc.error_messages->query_id != memc.query_id)
{
#endif
}
-memcached_return_t memcached_set_error(memcached_st& memc, memcached_return_t rc, const char *at, const char *str, size_t length)
+memcached_return_t memcached_set_error(Memcached& memc, memcached_return_t rc, const char *at, const char *str, size_t length)
{
assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client");
memcached_string_t tmp= { str, length };
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
#endif
-memcached_return_t memcached_set_error(memcached_st& memc, memcached_return_t rc, const char *at, memcached_string_t& str)
+memcached_return_t memcached_set_error(Memcached& memc, memcached_return_t rc, const char *at, memcached_string_t& str)
{
assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client");
if (memcached_fatal(rc) == false)
return rc;
}
-memcached_return_t memcached_set_parser_error(memcached_st& memc,
+memcached_return_t memcached_set_parser_error(Memcached& memc,
const char *at,
const char *format, ...)
{
return rc;
}
-memcached_return_t memcached_set_error(memcached_st& self, memcached_return_t rc, const char *at)
+memcached_return_t memcached_set_error(Memcached& self, memcached_return_t rc, const char *at)
{
assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client");
if (memcached_fatal(rc) == false)
return rc;
}
-memcached_return_t memcached_set_errno(memcached_st& self, int local_errno, const char *at, const char *str, size_t length)
+memcached_return_t memcached_set_errno(Memcached& self, int local_errno, const char *at, const char *str, size_t length)
{
memcached_string_t tmp= { str, length };
return memcached_set_errno(self, local_errno, at, tmp);
return memcached_set_errno(self, local_errno, at, tmp);
}
-memcached_return_t memcached_set_errno(memcached_st& self, int local_errno, const char *at)
+memcached_return_t memcached_set_errno(Memcached& self, int local_errno, const char *at)
{
if (local_errno == 0)
{
return rc;
}
-memcached_return_t memcached_set_errno(memcached_st& memc, int local_errno, const char *at, memcached_string_t& str)
+memcached_return_t memcached_set_errno(Memcached& memc, int local_errno, const char *at, memcached_string_t& str)
{
if (local_errno == 0)
{
_error_print(error->next);
}
-void memcached_error_print(const memcached_st *shell)
+void memcached_error_print(const Memcached *shell)
{
const Memcached* self= memcached2Memcached(shell);
if (self == NULL)
}
}
-void memcached_error_free(memcached_st& self)
+void memcached_error_free(Memcached& self)
{
_error_free(self.error_messages);
self.error_messages= NULL;
return memcached_strerror(memc, MEMCACHED_INVALID_ARGUMENTS);
}
-bool memcached_has_current_error(memcached_st &memc)
+bool memcached_has_current_error(Memcached &memc)
{
if (memc.error_messages
and memc.error_messages->query_id == memc.query_id
#define TOSTRING(x) STRINGIFY(x)
#define MEMCACHED_AT __FILE__ ":" TOSTRING(__LINE__)
-memcached_return_t memcached_set_parser_error(memcached_st& memc,
+memcached_return_t memcached_set_parser_error(Memcached& memc,
const char *at,
const char *format, ...);
-memcached_return_t memcached_set_error(memcached_st&, memcached_return_t rc, const char *at);
+memcached_return_t memcached_set_error(Memcached&, memcached_return_t rc, const char *at);
memcached_return_t memcached_set_error(org::libmemcached::Instance&, memcached_return_t rc, const char *at);
-memcached_return_t memcached_set_error(memcached_st&, memcached_return_t rc, const char *at, const char *str, size_t length);
+memcached_return_t memcached_set_error(Memcached&, memcached_return_t rc, const char *at, const char *str, size_t length);
memcached_return_t memcached_set_error(org::libmemcached::Instance&, memcached_return_t rc, const char *at, const char *str, size_t length);
-memcached_return_t memcached_set_error(memcached_st& memc, memcached_return_t rc, const char *at, memcached_string_t& str);
+memcached_return_t memcached_set_error(Memcached& memc, memcached_return_t rc, const char *at, memcached_string_t& str);
memcached_return_t memcached_set_error(org::libmemcached::Instance&, memcached_return_t rc, const char *at, memcached_string_t& str);
-memcached_return_t memcached_set_errno(memcached_st& memc, int local_errno, const char *at, memcached_string_t& str);
+memcached_return_t memcached_set_errno(Memcached& memc, int local_errno, const char *at, memcached_string_t& str);
memcached_return_t memcached_set_errno(org::libmemcached::Instance&, int local_errno, const char *at, memcached_string_t& str);
-memcached_return_t memcached_set_errno(memcached_st& memc, int local_errno, const char *at, const char *str, size_t length);
+memcached_return_t memcached_set_errno(Memcached& memc, int local_errno, const char *at, const char *str, size_t length);
memcached_return_t memcached_set_errno(org::libmemcached::Instance&, int local_errno, const char *at, const char *str, size_t length);
-memcached_return_t memcached_set_errno(memcached_st& memc, int local_errno, const char *at);
+memcached_return_t memcached_set_errno(Memcached& memc, int local_errno, const char *at);
memcached_return_t memcached_set_errno(org::libmemcached::Instance&, int local_errno, const char *at);
-bool memcached_has_current_error(memcached_st&);
+bool memcached_has_current_error(Memcached&);
bool memcached_has_current_error(org::libmemcached::Instance&);
-void memcached_error_free(memcached_st&);
+void memcached_error_free(Memcached&);
void memcached_error_free(memcached_server_st&);
#pragma once
-memcached_return_t initialize_query(memcached_st *self, bool increment_query_id);
+memcached_return_t initialize_query(Memcached *self, bool increment_query_id);
-memcached_return_t initialize_const_query(const memcached_st *self);
+memcached_return_t initialize_const_query(const Memcached *self);