rpm: all dist generic fedora
-clean-merge:
- find ./ | grep \.orig | xargs rm
- find ./ | grep \.rej | xargs rm
- find ./ | grep \~$ | xargs rm
+merge-clean:
+ find ./ | $(GREP) \.orig | xargs rm -f
+ find ./ | $(GREP) \.rej | xargs rm -f
+ find ./ | $(GREP) \~$$ | xargs rm -f
+ bzr unknowns
hudson-valgrind: all
@(cd tests; ${MAKE} hudson-valgrind)
*/
memcached_return_t memcached_behavior_set(memcached_st *ptr,
- memcached_behavior_t flag,
+ const memcached_behavior_t flag,
uint64_t data)
{
switch (flag)
}
uint64_t memcached_behavior_get(memcached_st *ptr,
- memcached_behavior_t flag)
+ const memcached_behavior_t flag)
{
switch (flag)
{
#endif
LIBMEMCACHED_API
-memcached_return_t memcached_behavior_set(memcached_st *ptr, memcached_behavior_t flag, uint64_t data);
+memcached_return_t memcached_behavior_set(memcached_st *ptr, const memcached_behavior_t flag, uint64_t data);
LIBMEMCACHED_API
-uint64_t memcached_behavior_get(memcached_st *ptr, memcached_behavior_t flag);
+uint64_t memcached_behavior_get(memcached_st *ptr, const memcached_behavior_t flag);
#ifdef __cplusplus
*/
memcached_return_t memcached_callback_set(memcached_st *ptr,
- memcached_callback_t flag,
+ const memcached_callback_t flag,
void *data)
{
switch (flag)
}
void *memcached_callback_get(memcached_st *ptr,
- memcached_callback_t flag,
+ const memcached_callback_t flag,
memcached_return_t *error)
{
memcached_return_t local_error;
LIBMEMCACHED_API
memcached_return_t memcached_callback_set(memcached_st *ptr,
- memcached_callback_t flag,
+ const memcached_callback_t flag,
void *data);
LIBMEMCACHED_API
void *memcached_callback_get(memcached_st *ptr,
- memcached_callback_t flag,
+ const memcached_callback_t flag,
memcached_return_t *error);
#ifdef __cplusplus
#include "libmemcached/byteorder.h"
/* string value */
-struct memcached_continuum_item_st {
+struct memcached_continuum_item_st
+{
uint32_t index;
uint32_t value;
};
/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
+ * Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
/* Public defines */
LIBMEMCACHED_API
-char *memcached_get(memcached_st *ptr,
+char *memcached_get(memcached_st *ptr,
const char *key, size_t key_length,
- size_t *value_length,
+ size_t *value_length,
uint32_t *flags,
memcached_return_t *error);
LIBMEMCACHED_API
-memcached_return_t memcached_mget(memcached_st *ptr,
- const char * const *keys,
- const size_t *key_length,
+memcached_return_t memcached_mget(memcached_st *ptr,
+ const char * const *keys,
+ const size_t *key_length,
size_t number_of_keys);
LIBMEMCACHED_API
-char *memcached_get_by_key(memcached_st *ptr,
- const char *master_key, size_t master_key_length,
- const char *key, size_t key_length,
- size_t *value_length,
+char *memcached_get_by_key(memcached_st *ptr,
+ const char *master_key, size_t master_key_length,
+ const char *key, size_t key_length,
+ size_t *value_length,
uint32_t *flags,
memcached_return_t *error);
LIBMEMCACHED_API
-memcached_return_t memcached_mget_by_key(memcached_st *ptr,
- const char *master_key, size_t
- master_key_length,
- const char * const *keys,
- const size_t *key_length,
- size_t number_of_keys);
+memcached_return_t memcached_mget_by_key(memcached_st *ptr,
+ const char *master_key,
+ size_t master_key_length,
+ const char * const *keys,
+ const size_t *key_length,
+ const size_t number_of_keys);
LIBMEMCACHED_API
-char *memcached_fetch(memcached_st *ptr,
- char *key, size_t *key_length,
- size_t *value_length, uint32_t *flags,
+char *memcached_fetch(memcached_st *ptr,
+ char *key,
+ size_t *key_length,
+ size_t *value_length,
+ uint32_t *flags,
memcached_return_t *error);
LIBMEMCACHED_API
-memcached_result_st *memcached_fetch_result(memcached_st *ptr,
+memcached_result_st *memcached_fetch_result(memcached_st *ptr,
memcached_result_st *result,
memcached_return_t *error);
memcached_return_t memcached_mget_execute(memcached_st *ptr,
const char * const *keys,
const size_t *key_length,
- size_t number_of_keys,
+ const size_t number_of_keys,
memcached_execute_fn *callback,
void *context,
- unsigned int number_of_callbacks);
+ const uint32_t number_of_callbacks);
LIBMEMCACHED_API
memcached_return_t memcached_mget_execute_by_key(memcached_st *ptr,
size_t number_of_keys,
memcached_execute_fn *callback,
void *context,
- unsigned int number_of_callbacks);
+ const uint32_t number_of_callbacks);
#ifdef __cplusplus
}
#define generate_udp_request_thread_id(A) (A) << UDP_REQUEST_ID_MSG_SIG_DIGITS
#define UDP_REQUEST_ID_MAX_THREAD_ID get_thread_id_from_request_id(0xFFFF)
-struct udp_datagram_header_st {
+struct udp_datagram_header_st
+{
uint16_t request_id;
uint16_t sequence_number;
uint16_t num_datagrams;
size_t size);
memcached_return_t memcached_io_close(memcached_server_st *ptr);
/* Read n bytes of data from the server and store them in dta */
-memcached_return_t memcached_safe_read(memcached_server_st *ptr,
- void *dta,
+memcached_return_t memcached_safe_read(memcached_server_st *ptr,
+ void *dta,
size_t size);
/* Read a single response from the server */
memcached_return_t memcached_read_one_response(memcached_server_st *ptr,
/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
+ * Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
+ * Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
typedef struct memcached_pool_st memcached_pool_st;
LIBMEMCACHED_API
-memcached_pool_st *memcached_pool_create(memcached_st* mmc, uint32_t initial,
+memcached_pool_st *memcached_pool_create(memcached_st* mmc, uint32_t initial,
uint32_t max);
LIBMEMCACHED_API
memcached_st* memcached_pool_destroy(memcached_pool_st* pool);
bool block,
memcached_return_t* rc);
LIBMEMCACHED_API
-memcached_return_t memcached_pool_push(memcached_pool_st* pool,
- memcached_st* mmc);
+memcached_return_t memcached_pool_push(memcached_pool_st* pool,
+ memcached_st* mmc);
LIBMEMCACHED_API
memcached_return_t memcached_pool_behavior_set(memcached_pool_st *ptr,
/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
+ * Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
+ * Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
LIBMEMCACHED_API
void memcached_result_reset(memcached_result_st *ptr);
LIBMEMCACHED_API
-memcached_result_st *memcached_result_create(memcached_st *ptr,
+memcached_result_st *memcached_result_create(memcached_st *ptr,
memcached_result_st *result);
#define memcached_result_key_value(A) (A)->key
#define memcached_result_key_length(A) (A)->key_length
{
if (ptr == NULL)
{
- ptr= (memcached_server_st *)calloc(1, sizeof(memcached_server_st));
+ ptr= (memcached_server_st *)memc->call_calloc(memc, 1, sizeof(memcached_server_st));
if (!ptr)
return NULL; /* MEMCACHED_MEMORY_ALLOCATION_FAILURE */
uint32_t number_of_callbacks);
LIBMEMCACHED_API
-memcached_server_st *memcached_server_by_key(memcached_st *ptr, const char *key,
- size_t key_length, memcached_return_t *error);
+memcached_server_st *memcached_server_by_key(memcached_st *ptr,
+ const char *key,
+ size_t key_length,
+ memcached_return_t *error);
LIBMEMCACHED_API
const char *memcached_server_error(memcached_server_st *ptr);
memcached_server_st *memcached_server_create(memcached_st *memc, memcached_server_st *ptr);
LIBMEMCACHED_API
-memcached_server_st *memcached_server_create_with(memcached_st *memc, memcached_server_st *host,
- const char *hostname, in_port_t port,
- uint32_t weight, memcached_connection_t type);
+memcached_server_st *memcached_server_create_with(memcached_st *memc,
+ memcached_server_st *host,
+ const char *hostname,
+ in_port_t port,
+ uint32_t weight,
+ memcached_connection_t type);
LIBMEMCACHED_API
void memcached_server_free(memcached_server_st *ptr);
+
LIBMEMCACHED_API
-memcached_server_st *memcached_server_clone(memcached_server_st *clone, memcached_server_st *ptr);
+memcached_server_st *memcached_server_clone(memcached_server_st *clone,
+ memcached_server_st *ptr);
+
LIBMEMCACHED_API
-memcached_analysis_st *memcached_analyze(memcached_st *memc, memcached_stat_st *memc_stat,
+memcached_analysis_st *memcached_analyze(memcached_st *memc,
+ memcached_stat_st *memc_stat,
memcached_return_t *error);
LIBMEMCACHED_API
/* LibMemcached
- * Copyright (C) 2006-2009 Brian Aker
+ * Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
/* All of the functions for adding data to the server */
LIBMEMCACHED_API
-memcached_return_t memcached_set(memcached_st *ptr, const char *key, size_t key_length,
- const char *value, size_t value_length,
+memcached_return_t memcached_set(memcached_st *ptr, const char *key, size_t key_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
memcached_return_t memcached_add(memcached_st *ptr, const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
memcached_return_t memcached_replace(memcached_st *ptr, const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
-memcached_return_t memcached_append(memcached_st *ptr,
+memcached_return_t memcached_append(memcached_st *ptr,
const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
-memcached_return_t memcached_prepend(memcached_st *ptr,
+memcached_return_t memcached_prepend(memcached_st *ptr,
const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
-memcached_return_t memcached_cas(memcached_st *ptr,
+memcached_return_t memcached_cas(memcached_st *ptr,
const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags,
uint64_t cas);
LIBMEMCACHED_API
-memcached_return_t memcached_set_by_key(memcached_st *ptr,
- const char *master_key, size_t master_key_length,
- const char *key, size_t key_length,
- const char *value, size_t value_length,
+memcached_return_t memcached_set_by_key(memcached_st *ptr,
+ const char *master_key, size_t master_key_length,
+ const char *key, size_t key_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
-memcached_return_t memcached_add_by_key(memcached_st *ptr,
+memcached_return_t memcached_add_by_key(memcached_st *ptr,
const char *master_key, size_t master_key_length,
const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
-memcached_return_t memcached_replace_by_key(memcached_st *ptr,
+memcached_return_t memcached_replace_by_key(memcached_st *ptr,
const char *master_key, size_t master_key_length,
const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
-memcached_return_t memcached_prepend_by_key(memcached_st *ptr,
+memcached_return_t memcached_prepend_by_key(memcached_st *ptr,
const char *master_key, size_t master_key_length,
const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
-memcached_return_t memcached_append_by_key(memcached_st *ptr,
+memcached_return_t memcached_append_by_key(memcached_st *ptr,
const char *master_key, size_t master_key_length,
const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags);
LIBMEMCACHED_API
-memcached_return_t memcached_cas_by_key(memcached_st *ptr,
+memcached_return_t memcached_cas_by_key(memcached_st *ptr,
const char *master_key, size_t master_key_length,
const char *key, size_t key_length,
- const char *value, size_t value_length,
+ const char *value, size_t value_length,
time_t expiration,
uint32_t flags,
uint64_t cas);
const char *key, size_t key_length);
typedef memcached_return_t (*memcached_dump_fn)(memcached_st *ptr,
- const char *key, size_t key_length, void *context);
+ const char *key,
+ size_t key_length,
+ void *context);
typedef struct {
memcached_execute_fn *callback;