From: Monty Taylor Date: Tue, 29 Dec 2009 19:14:03 +0000 (-0800) Subject: Made the memcached_string stuff private, but still testable. X-Git-Tag: 0.37~37^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=441e884367c1c73c6ef9a57aa9e215018978e3ba;p=awesomized%2Flibmemcached Made the memcached_string stuff private, but still testable. --- diff --git a/libmemcached/include.am b/libmemcached/include.am index 481329e6..9150b081 100644 --- a/libmemcached/include.am +++ b/libmemcached/include.am @@ -55,10 +55,19 @@ libmemcached_libmemcachedprotocol_la_SOURCES = \ libmemcached_libmemcachedprotocol_la_LDFLAGS= ${AM_LDFLAGS} -version-info 0:0:0 -noinst_LTLIBRARIES+= libmemcached/libmemcachedcallbacks.la +noinst_LTLIBRARIES+= \ + libmemcached/libmemcachedcallbacks.la + libmemcached_libmemcachedcallbacks_la_CFLAGS = ${AM_CFLAGS} ${NO_STRICT_ALIASING} libmemcached_libmemcachedcallbacks_la_SOURCES = libmemcached/callback.c +# This noinst lib contains things we want to be ABI private but still want to +# either use in client programs or be able to test in test cases +# These symbols will not be exposed in the shipped .so +noinst_LTLIBRARIES+= \ + libmemcached/libmemcachedinternal.la +libmemcached_libmemcachedinternal_la_SOURCES = libmemcached/string.c + lib_LTLIBRARIES+= libmemcached/libmemcached.la libmemcached_libmemcached_la_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION} libmemcached_libmemcached_la_SOURCES = \ @@ -92,7 +101,6 @@ libmemcached_libmemcached_la_SOURCES = \ libmemcached/stats.c \ libmemcached/storage.c \ libmemcached/strerror.c \ - libmemcached/string.c \ libmemcached/verbosity.c \ libmemcached/version.c @@ -101,8 +109,8 @@ if INCLUDE_HSIEH_SRC libmemcached_libmemcached_la_SOURCES += libmemcached/hsieh_hash.c endif -libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la -libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la +libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la +libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la libmemcached_libmemcached_la_LDFLAGS= ${AM_LDFLAGS} -version-info 3:0:0 if BUILD_LIBMEMCACHEDUTIL diff --git a/libmemcached/string.h b/libmemcached/string.h index d93bc0d2..03a5bf8a 100644 --- a/libmemcached/string.h +++ b/libmemcached/string.h @@ -16,6 +16,7 @@ extern "C" { #endif +LIBMEMCACHED_LOCAL struct memcached_string_st { memcached_st *root; char *end; @@ -33,26 +34,26 @@ struct memcached_string_st { #define memcached_string_size(A) (A)->current_size #define memcached_string_value(A) (A)->string -LIBMEMCACHED_API +LIBMEMCACHED_LOCAL memcached_string_st *memcached_string_create(memcached_st *ptr, memcached_string_st *string, size_t initial_size); -LIBMEMCACHED_API +LIBMEMCACHED_LOCAL memcached_return_t memcached_string_check(memcached_string_st *string, size_t need); -LIBMEMCACHED_API +LIBMEMCACHED_LOCAL char *memcached_string_c_copy(memcached_string_st *string); -LIBMEMCACHED_API +LIBMEMCACHED_LOCAL memcached_return_t memcached_string_append_character(memcached_string_st *string, char character); -LIBMEMCACHED_API +LIBMEMCACHED_LOCAL memcached_return_t memcached_string_append(memcached_string_st *string, const char *value, size_t length); -LIBMEMCACHED_API +LIBMEMCACHED_LOCAL memcached_return_t memcached_string_reset(memcached_string_st *string); -LIBMEMCACHED_API +LIBMEMCACHED_LOCAL void memcached_string_free(memcached_string_st *string); #ifdef __cplusplus diff --git a/tests/include.am b/tests/include.am index 896ba139..b13674ec 100644 --- a/tests/include.am +++ b/tests/include.am @@ -48,6 +48,7 @@ tests_testapp_LDADD= \ clients/libgenexec.la \ tests/libserver.la \ tests/libtest.la \ + libmemcached/libmemcachedinternal.la \ $(TESTS_LDADDS) tests_testapp_DEPENDENCIES= $(tests_testapp_LDADD)