include/bluetooth: rearrange for standard use of extern "C"
Consistently place C++ use of extern "C" after all include directives, within the negative branch of _ASMLANGUAGE if used. Background from issue #17997: Declarations that use C linkage should be placed within extern "C" so the language linkage is correct when the header is included by a C++ compiler. Similarly #include directives should be outside the extern "C" to ensure the language-specific default linkage is applied to any declarations provided by the included header. See: https://en.cppreference.com/w/cpp/language/language_linkage Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
754d1274a7
commit
5412409781
9 changed files with 26 additions and 27 deletions
|
@ -14,6 +14,7 @@
|
|||
#include <linker/sections.h>
|
||||
#include <offsets.h>
|
||||
#include <zephyr.h>
|
||||
#include <logging/log.h>
|
||||
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/hci.h>
|
||||
|
@ -32,8 +33,6 @@ extern "C" {
|
|||
#define LOG_LEVEL CONFIG_BT_LOG_LEVEL
|
||||
#endif
|
||||
|
||||
#include <logging/log.h>
|
||||
|
||||
LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
||||
|
||||
#define BT_DBG(fmt, ...) LOG_DBG(fmt, ##__VA_ARGS__)
|
||||
|
@ -62,4 +61,3 @@ const char *bt_addr_le_str_real(const bt_addr_le_t *addr);
|
|||
#endif
|
||||
|
||||
#endif /* __BT_LOG_H */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue