Merge lp:~mordred/libmemcached/internal-abi-privacy into lp:~tangent-org/libmemcached/trunk

Proposed by Monty Taylor
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mordred/libmemcached/internal-abi-privacy
Merge into: lp:~tangent-org/libmemcached/trunk
Diff against target: 100 lines (+21/-11)
3 files modified
libmemcached/include.am (+12/-4)
libmemcached/string.h (+8/-7)
tests/include.am (+1/-0)
To merge this branch: bzr merge lp:~mordred/libmemcached/internal-abi-privacy
Reviewer Review Type Date Requested Status
Brian Aker Pending
Review via email: mp+16655@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Monty Taylor (mordred) wrote :

Hides the memcached_string functions, but also demonstrates the mechanism we can use for hiding things that we need in executables in the tree. Namely:

- Mark the API entries as _LOCAL, so that they are hidden via the hidden attribute
- Move the implementation files from the main lib to a noinst convenience lib
- Link the conv lib into the main lib, but also link it with the in-tree programs that need the symbols
- WIN

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libmemcached/include.am'
2--- libmemcached/include.am 2009-12-22 06:58:44 +0000
3+++ libmemcached/include.am 2009-12-29 19:27:12 +0000
4@@ -55,10 +55,19 @@
5
6 libmemcached_libmemcachedprotocol_la_LDFLAGS= ${AM_LDFLAGS} -version-info 0:0:0
7
8-noinst_LTLIBRARIES+= libmemcached/libmemcachedcallbacks.la
9+noinst_LTLIBRARIES+= \
10+ libmemcached/libmemcachedcallbacks.la
11+
12 libmemcached_libmemcachedcallbacks_la_CFLAGS = ${AM_CFLAGS} ${NO_STRICT_ALIASING}
13 libmemcached_libmemcachedcallbacks_la_SOURCES = libmemcached/callback.c
14
15+# This noinst lib contains things we want to be ABI private but still want to
16+# either use in client programs or be able to test in test cases
17+# These symbols will not be exposed in the shipped .so
18+noinst_LTLIBRARIES+= \
19+ libmemcached/libmemcachedinternal.la
20+libmemcached_libmemcachedinternal_la_SOURCES = libmemcached/string.c
21+
22 lib_LTLIBRARIES+= libmemcached/libmemcached.la
23 libmemcached_libmemcached_la_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION}
24 libmemcached_libmemcached_la_SOURCES = \
25@@ -92,7 +101,6 @@
26 libmemcached/stats.c \
27 libmemcached/storage.c \
28 libmemcached/strerror.c \
29- libmemcached/string.c \
30 libmemcached/verbosity.c \
31 libmemcached/version.c
32
33@@ -101,8 +109,8 @@
34 libmemcached_libmemcached_la_SOURCES += libmemcached/hsieh_hash.c
35 endif
36
37-libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la
38-libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la
39+libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la
40+libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la libmemcached/libmemcachedinternal.la
41 libmemcached_libmemcached_la_LDFLAGS= ${AM_LDFLAGS} -version-info 3:0:0
42
43 if BUILD_LIBMEMCACHEDUTIL
44
45=== modified file 'libmemcached/string.h'
46--- libmemcached/string.h 2009-12-16 23:01:10 +0000
47+++ libmemcached/string.h 2009-12-29 19:27:12 +0000
48@@ -16,6 +16,7 @@
49 extern "C" {
50 #endif
51
52+LIBMEMCACHED_LOCAL
53 struct memcached_string_st {
54 memcached_st *root;
55 char *end;
56@@ -33,26 +34,26 @@
57 #define memcached_string_size(A) (A)->current_size
58 #define memcached_string_value(A) (A)->string
59
60-LIBMEMCACHED_API
61+LIBMEMCACHED_LOCAL
62 memcached_string_st *memcached_string_create(memcached_st *ptr,
63 memcached_string_st *string,
64 size_t initial_size);
65-LIBMEMCACHED_API
66+LIBMEMCACHED_LOCAL
67 memcached_return_t memcached_string_check(memcached_string_st *string, size_t need);
68
69-LIBMEMCACHED_API
70+LIBMEMCACHED_LOCAL
71 char *memcached_string_c_copy(memcached_string_st *string);
72
73-LIBMEMCACHED_API
74+LIBMEMCACHED_LOCAL
75 memcached_return_t memcached_string_append_character(memcached_string_st *string,
76 char character);
77-LIBMEMCACHED_API
78+LIBMEMCACHED_LOCAL
79 memcached_return_t memcached_string_append(memcached_string_st *string,
80 const char *value, size_t length);
81-LIBMEMCACHED_API
82+LIBMEMCACHED_LOCAL
83 memcached_return_t memcached_string_reset(memcached_string_st *string);
84
85-LIBMEMCACHED_API
86+LIBMEMCACHED_LOCAL
87 void memcached_string_free(memcached_string_st *string);
88
89 #ifdef __cplusplus
90
91=== modified file 'tests/include.am'
92--- tests/include.am 2009-12-19 01:28:01 +0000
93+++ tests/include.am 2009-12-29 19:27:12 +0000
94@@ -48,6 +48,7 @@
95 clients/libgenexec.la \
96 tests/libserver.la \
97 tests/libtest.la \
98+ libmemcached/libmemcachedinternal.la \
99 $(TESTS_LDADDS)
100 tests_testapp_DEPENDENCIES= $(tests_testapp_LDADD)
101

Subscribers

People subscribed via source and target branches

to all changes: