From: Brian Aker Date: Sun, 20 Dec 2009 19:28:28 +0000 (-0800) Subject: Mvoe pool to fit style. X-Git-Tag: 0.37~46 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ebe4a05e9b023d7ef5b26ee98318a11582264efd;p=m6w6%2Flibmemcached Mvoe pool to fit style. --- diff --git a/libmemcached/include.am b/libmemcached/include.am index dc70562f..d7404443 100644 --- a/libmemcached/include.am +++ b/libmemcached/include.am @@ -103,7 +103,7 @@ libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks. libmemcached_libmemcached_la_LDFLAGS= ${AM_LDFLAGS} -version-info 3:0:0 if BUILD_LIBMEMCACHEDUTIL -pkginclude_HEADERS+= libmemcached/memcached_util.h libmemcached/pool.h +pkginclude_HEADERS+= libmemcached/memcached_util.h libmemcached/util/pool.h lib_LTLIBRARIES+= libmemcached/libmemcachedutil.la endif diff --git a/libmemcached/memcached_util.h b/libmemcached/memcached_util.h index 7b7c5e83..0c2c6777 100644 --- a/libmemcached/memcached_util.h +++ b/libmemcached/memcached_util.h @@ -15,6 +15,6 @@ #ifndef MEMCACHED_UTIL_H #define MEMCACHED_UTIL_H -#include +#include #endif /* MEMCACHED_UTIL_H */ diff --git a/libmemcached/pool.h b/libmemcached/pool.h deleted file mode 100644 index b6325f3e..00000000 --- a/libmemcached/pool.h +++ /dev/null @@ -1,51 +0,0 @@ -/* LibMemcached - * Copyright (C) 2006-2009 Brian Aker - * All rights reserved. - * - * Use and distribution licensed under the BSD license. See - * the COPYING file in the parent directory for full text. - * - * Summary: Connection pool implementation for libmemcached. - * - */ - - -#ifndef MEMCACHED_POOL_H -#define MEMCACHED_POOL_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct memcached_pool_st; -typedef struct memcached_pool_st memcached_pool_st; - -LIBMEMCACHED_API -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); -LIBMEMCACHED_API -memcached_st* memcached_pool_pop(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); - -LIBMEMCACHED_API -memcached_return_t memcached_pool_behavior_set(memcached_pool_st *ptr, - memcached_behavior_t flag, - uint64_t data); -LIBMEMCACHED_API -memcached_return_t memcached_pool_behavior_get(memcached_pool_st *ptr, - memcached_behavior_t flag, - uint64_t *value); - -#ifdef __cplusplus -} -#endif - -#endif /* MEMCACHED_POOL_H */ diff --git a/libmemcached/util/pool.c b/libmemcached/util/pool.c index 7cb25177..012d550f 100644 --- a/libmemcached/util/pool.c +++ b/libmemcached/util/pool.c @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ #include "libmemcached/common.h" -#include "libmemcached/pool.h" +#include "libmemcached/memcached_util.h" #include #include diff --git a/libmemcached/util/pool.h b/libmemcached/util/pool.h new file mode 100644 index 00000000..b6325f3e --- /dev/null +++ b/libmemcached/util/pool.h @@ -0,0 +1,51 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: Connection pool implementation for libmemcached. + * + */ + + +#ifndef MEMCACHED_POOL_H +#define MEMCACHED_POOL_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct memcached_pool_st; +typedef struct memcached_pool_st memcached_pool_st; + +LIBMEMCACHED_API +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); +LIBMEMCACHED_API +memcached_st* memcached_pool_pop(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); + +LIBMEMCACHED_API +memcached_return_t memcached_pool_behavior_set(memcached_pool_st *ptr, + memcached_behavior_t flag, + uint64_t data); +LIBMEMCACHED_API +memcached_return_t memcached_pool_behavior_get(memcached_pool_st *ptr, + memcached_behavior_t flag, + uint64_t *value); + +#ifdef __cplusplus +} +#endif + +#endif /* MEMCACHED_POOL_H */