From c0402f08f4587cd7a118f02c596a65fd4027b45f Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 10 Jul 2019 19:44:22 -0700 Subject: [PATCH] ircd::util: Improve the test trigger prototype. --- include/ircd/util/test.h | 7 +++---- modules/console.cc | 9 ++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/ircd/util/test.h b/include/ircd/util/test.h index e531cdfd6..8631f1c55 100644 --- a/include/ircd/util/test.h +++ b/include/ircd/util/test.h @@ -11,8 +11,7 @@ #pragma once #define HAVE_IRCD_UTIL_TEST_H -namespace ircd { -inline namespace util +namespace ircd { - void test(); -}} + extern "C" bool ircd_test(const string_view & = {}); +} diff --git a/modules/console.cc b/modules/console.cc index a5e6e1d73..bdf012a0b 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -416,10 +416,17 @@ console_cmd__exit(opt &out, const string_view &line) return false; } +// +// Test trigger stub +// bool console_cmd__test(opt &out, const string_view &line) { - ircd::test(); // Test trigger stub + const bool result + { + ircd_test(line) + }; + return true; }