From 043494618e6c22a101907ce417aa2723161571b0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 3 Jul 2019 10:51:26 +0100 Subject: Introduce a new macro to export symbols solely for tests This lets us expose symbols in the embedded-tests build without expanding the symbol table of the production library. Signed-off-by: Simon McVittie --- dbus/dbus-connection-internal.h | 3 +-- dbus/dbus-internals.h | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dbus/dbus-connection-internal.h b/dbus/dbus-connection-internal.h index 06302dd0..de4e55b1 100644 --- a/dbus/dbus-connection-internal.h +++ b/dbus/dbus-connection-internal.h @@ -136,8 +136,7 @@ void _dbus_connection_get_stats (DBusConnection *connection, dbus_uint32_t *out_peak_fds); -/* if DBUS_ENABLE_EMBEDDED_TESTS */ -DBUS_PRIVATE_EXPORT +DBUS_EMBEDDED_TESTS_EXPORT const char* _dbus_connection_get_address (DBusConnection *connection); /* This _dbus_bus_* stuff doesn't really belong here, but dbus-bus-internal.h seems diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 647da6f7..46afde88 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -35,6 +35,12 @@ DBUS_BEGIN_DECLS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS +#define DBUS_EMBEDDED_TESTS_EXPORT DBUS_PRIVATE_EXPORT +#else +#define DBUS_EMBEDDED_TESTS_EXPORT /* nothing */ +#endif + DBUS_PRIVATE_EXPORT void _dbus_warn (const char *format, ...) _DBUS_GNUC_PRINTF (1, 2); -- cgit v1.2.1