Skip to content

Commit ae09acf

Browse files
authored
Merge pull request #118 from apple/egorzhdan/extern-c
Make AtomicsShims compatible with C++ interop
2 parents d61ca10 + 14b0f18 commit ae09acf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/_AtomicsShims/include/_AtomicsShims.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@
3434
# define SWIFTATOMIC_SHIMS_EXPORT
3535
# endif
3636
#else
37-
# define SWIFTATOMIC_SHIMS_EXPORT extern
37+
# ifdef __cplusplus
38+
# define SWIFTATOMIC_SHIMS_EXPORT extern "C"
39+
# else
40+
# define SWIFTATOMIC_SHIMS_EXPORT extern
41+
# endif
3842
#endif
3943

4044
// Swift-importable shims for C atomics.

0 commit comments

Comments
 (0)