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 <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2019-07-03 10:51:26 +01:00
parent 0b8878133f
commit 043494618e
2 changed files with 7 additions and 2 deletions

View file

@ -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

View file

@ -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);