summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2019-07-03 10:51:26 +0100
committerSimon McVittie <smcv@collabora.com>2019-07-03 11:17:27 +0100
commit043494618e6c22a101907ce417aa2723161571b0 (patch)
tree19bd991a5eec3a1229f527747668cc6922f3aea5
parent0b8878133f806351b213b80097b2bd6de5677f2c (diff)
downloaddbus-043494618e6c22a101907ce417aa2723161571b0.tar.gz
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>
-rw-r--r--dbus/dbus-connection-internal.h3
-rw-r--r--dbus/dbus-internals.h6
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);