Skip to content

Commit 47af628

Browse files
committed
Wrap headers with extern "C" in C++ mode.
1 parent 87eb4e5 commit 47af628

File tree

6 files changed

+48
-0
lines changed

6 files changed

+48
-0
lines changed

features/autocorrection.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,13 @@
2626

2727
#include "quantum.h"
2828

29+
#ifdef __cplusplus
30+
extern "C" {
31+
#endif
32+
2933
bool process_autocorrection(uint16_t keycode, keyrecord_t* record);
3034

35+
#ifdef __cplusplus
36+
}
37+
#endif
38+

features/caps_word.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646

4747
#include "quantum.h"
4848

49+
#ifdef __cplusplus
50+
extern "C" {
51+
#endif
52+
4953
// Call this function from `process_record_user()` to implement Caps Word.
5054
bool process_caps_word(uint16_t keycode, keyrecord_t* record);
5155

@@ -126,3 +130,7 @@ void caps_word_set_user(bool active);
126130
// deactivate Caps Word.
127131
bool caps_word_press_user(uint16_t keycode);
128132

133+
#ifdef __cplusplus
134+
}
135+
#endif
136+

features/custom_shift_keys.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454

5555
#include "quantum.h"
5656

57+
#ifdef __cplusplus
58+
extern "C" {
59+
#endif
60+
5761
typedef struct {
5862
uint16_t keycode;
5963
uint16_t shifted_keycode;
@@ -64,3 +68,7 @@ extern uint8_t NUM_CUSTOM_SHIFT_KEYS;
6468

6569
bool process_custom_shift_keys(uint16_t keycode, keyrecord_t *record);
6670

71+
#ifdef __cplusplus
72+
}
73+
#endif
74+

features/layer_lock.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242

4343
#include "quantum.h"
4444

45+
#ifdef __cplusplus
46+
extern "C" {
47+
#endif
48+
4549
// In your keymap, define a custom keycode to use for Layer Lock. Then handle
4650
// Layer Lock from your `process_record_user` function by calling
4751
// `process_layer_lock`, passing your custom keycode for the `lock_keycode` arg:
@@ -78,3 +82,7 @@ void layer_lock_invert(uint8_t layer);
7882
// }
7983
void layer_lock_set_user(layer_state_t locked_layers);
8084

85+
#ifdef __cplusplus
86+
}
87+
#endif
88+

features/mouse_turbo_click.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535

3636
#include "quantum.h"
3737

38+
#ifdef __cplusplus
39+
extern "C" {
40+
#endif
41+
3842
// In your keymap, define a custom keycode to use for Turbo Click. Then handle
3943
// Turbo Click from your `process_record_user` function by calling
4044
// `process_mouse_turbo_click`, passing your custom keycode for the
@@ -51,3 +55,7 @@
5155
bool process_mouse_turbo_click(uint16_t keycode, keyrecord_t* record,
5256
uint16_t turbo_click_keycode);
5357

58+
#ifdef __cplusplus
59+
}
60+
#endif
61+

features/select_word.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@
3333

3434
#include "quantum.h"
3535

36+
#ifdef __cplusplus
37+
extern "C" {
38+
#endif
39+
3640
bool process_select_word(uint16_t keycode, keyrecord_t* record,
3741
uint16_t sel_keycode);
3842

43+
#ifdef __cplusplus
44+
}
45+
#endif
46+

0 commit comments

Comments
 (0)