From 459abeba25893b980ea6dc1a56b380c975fe53ff Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 23 Jul 2018 17:29:56 +0100 Subject: [PATCH 3/7] test: Don't use dbus_internal prefix for functions not in libdbus As in the previous commit, this prefix is meaningless in translation units that don't get compiled into libdbus. Signed-off-by: Simon McVittie --- dbus/dbus-marshal-byteswap-util.c | 4 +--- dbus/dbus-marshal-recursive-util.c | 8 ++++---- dbus/dbus-marshal-validate-util.c | 10 ++++------ dbus/dbus-message-factory.c | 5 ++--- dbus/dbus-test.h | 13 ++++++------- 5 files changed, 17 insertions(+), 23 deletions(-) diff --git a/dbus/dbus-marshal-byteswap-util.c b/dbus/dbus-marshal-byteswap-util.c index cdca3f44..4891e0de 100644 --- a/dbus/dbus-marshal-byteswap-util.c +++ b/dbus/dbus-marshal-byteswap-util.c @@ -43,9 +43,7 @@ do_byteswap_test (int byte_order) opposite_order = byte_order == DBUS_LITTLE_ENDIAN ? DBUS_BIG_ENDIAN : DBUS_LITTLE_ENDIAN; sequence = 0; - while (dbus_internal_do_not_use_generate_bodies (sequence, - byte_order, - &signature, &body)) + while (_dbus_test_generate_bodies (sequence, byte_order, &signature, &body)) { DBusString copy; DBusTypeReader body_reader; diff --git a/dbus/dbus-marshal-recursive-util.c b/dbus/dbus-marshal-recursive-util.c index e10b7a6f..97bc5fe3 100644 --- a/dbus/dbus-marshal-recursive-util.c +++ b/dbus/dbus-marshal-recursive-util.c @@ -1637,10 +1637,10 @@ build_body (TestTypeNode **nodes, } dbus_bool_t -dbus_internal_do_not_use_generate_bodies (int sequence, - int byte_order, - DBusString *signature, - DBusString *body) +_dbus_test_generate_bodies (int sequence, + int byte_order, + DBusString *signature, + DBusString *body) { TestTypeNode *nodes[1]; int i; diff --git a/dbus/dbus-marshal-validate-util.c b/dbus/dbus-marshal-validate-util.c index dc074b2d..2ef13a63 100644 --- a/dbus/dbus-marshal-validate-util.c +++ b/dbus/dbus-marshal-validate-util.c @@ -443,9 +443,8 @@ _dbus_marshal_validate_test (void) _dbus_test_fatal ("oom"); sequence = 0; - while (dbus_internal_do_not_use_generate_bodies (sequence, - DBUS_LITTLE_ENDIAN, - &signature, &body)) + while (_dbus_test_generate_bodies (sequence, DBUS_LITTLE_ENDIAN, + &signature, &body)) { DBusValidity validity; @@ -468,9 +467,8 @@ _dbus_marshal_validate_test (void) } sequence = 0; - while (dbus_internal_do_not_use_generate_bodies (sequence, - DBUS_BIG_ENDIAN, - &signature, &body)) + while (_dbus_test_generate_bodies (sequence, DBUS_BIG_ENDIAN, + &signature, &body)) { DBusValidity validity; diff --git a/dbus/dbus-message-factory.c b/dbus/dbus-message-factory.c index f358eb11..6a8433e9 100644 --- a/dbus/dbus-message-factory.c +++ b/dbus/dbus-message-factory.c @@ -188,9 +188,8 @@ generate_many_bodies_inner (DBusMessageDataIter *iter, if (!_dbus_string_init (&signature) || !_dbus_string_init (&body)) _dbus_test_fatal ("oom"); - if (dbus_internal_do_not_use_generate_bodies (iter_get_sequence (iter), - byte_order, - &signature, &body)) + if (_dbus_test_generate_bodies (iter_get_sequence (iter), byte_order, + &signature, &body)) { const char *v_SIGNATURE; diff --git a/dbus/dbus-test.h b/dbus/dbus-test.h index 89cb23b5..111e52f1 100644 --- a/dbus/dbus-test.h +++ b/dbus/dbus-test.h @@ -96,13 +96,12 @@ dbus_bool_t _dbus_object_tree_test (void); dbus_bool_t _dbus_credentials_test (const char *test_data_dir); -void _dbus_run_tests (const char *test_data_dir, - const char *specific_test); - -dbus_bool_t dbus_internal_do_not_use_generate_bodies (int sequence, - int byte_order, - DBusString *signature, - DBusString *body); +void _dbus_run_tests (const char *test_data_dir, + const char *specific_test); +dbus_bool_t _dbus_test_generate_bodies (int sequence, + int byte_order, + DBusString *signature, + DBusString *body); #endif /* DBUS_TEST_H */ -- 2.18.0