]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Introduce a new macro to export symbols solely for tests
authorSimon McVittie <smcv@collabora.com>
Wed, 3 Jul 2019 09:51:26 +0000 (10:51 +0100)
committerSimon McVittie <smcv@collabora.com>
Wed, 3 Jul 2019 10:17:27 +0000 (11:17 +0100)
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>
dbus/dbus-connection-internal.h
dbus/dbus-internals.h

index 06302dd00a4daff70a3884275fefe3aa1c09cac0..de4e55b1c162789ca4d48deb26201f418cf63bc2 100644 (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
index 647da6f72ec1e580cf46bcbaa6b2226c0f89412e..46afde884b244c02f20ba43c5fb9b28de1415cab 100644 (file)
 
 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);