Skip to content

Commit 83c21dc

Browse files
authored
Merge pull request #675 from pyro9/fix_extern
Allow common_func.h to compile without error when it is included inside extern "C"
2 parents 8482e4e + 6de0971 commit 83c21dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/nRF5/common_func.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040

4141
#ifdef __cplusplus
42+
extern "C++" {
4243
// namespace and templates must be outside the `extern "C"` declaration...
4344
namespace ADAFRUIT_DETAIL
4445
{
@@ -48,6 +49,7 @@
4849
return N;
4950
}
5051
}
52+
}
5153
extern "C" {
5254
#define arrcount(arr) ADAFRUIT_DETAIL::arrcount_fails_if_not_array(arr)
5355
#define ADA_STATIC_ASSERT(const_expr, message) static_assert(const_expr, message)

0 commit comments

Comments
 (0)