From 5e5803697481b9bc47faf1ffd006279ae40c124b Mon Sep 17 00:00:00 2001 From: Anna Bridge Date: Fri, 27 May 2016 14:48:32 +0100 Subject: [PATCH] Update the extern C decalaration. Add __cpluplus block to unity_handler.h and include that header in unity_handler.cpp. --- frameworks/utest/source/unity_handler.cpp | 3 +-- frameworks/utest/utest/unity_handler.h | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frameworks/utest/source/unity_handler.cpp b/frameworks/utest/source/unity_handler.cpp index 1c59997746..827014b391 100644 --- a/frameworks/utest/source/unity_handler.cpp +++ b/frameworks/utest/source/unity_handler.cpp @@ -18,16 +18,15 @@ #include "utest/harness.h" #include "utest/stack_trace.h" + #include "utest/unity_handler.h" -extern "C" void utest_unity_assert_failure(void) { UTEST_LOG_FUNCTION(); utest::v1::Harness::raise_failure(utest::v1::REASON_ASSERTION); } -extern "C" void utest_unity_ignore_failure(void) { UTEST_LOG_FUNCTION(); diff --git a/frameworks/utest/utest/unity_handler.h b/frameworks/utest/utest/unity_handler.h index 509156a1b5..4535785489 100644 --- a/frameworks/utest/utest/unity_handler.h +++ b/frameworks/utest/utest/unity_handler.h @@ -21,10 +21,18 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /// this function is called from the unity module when an assertion failed. void utest_unity_assert_failure(void); /// this function is called from the unity module when an assertion failed, but is ignored. void utest_unity_ignore_failure(void); +#ifdef __cplusplus +} +#endif + #endif // UTEST_UNITY_ASSERT_FAILURE_H