Commit c820f72
authored
Fix compiler error in CoreFoundation when building in C++ mode (#5081)
`__CFAllocatorRespectsHintZeroWhenAllocating` has two declarations in different headers: `ForFoundationOnly.h` and `ForSwiftFoundationOnly.h`. One of the declarations was under `extern "C"` block, the other one wasn't. Clang accepts this in C language mode, but it is a hard compiler error in C++ language mode due to a linkage mismatch.
This was blocking clients from using CoreFoundation in Swift projects that enable C++ interoperability.
This change makes sure that both declarations of `__CFAllocatorRespectsHintZeroWhenAllocating` are under `extern "C"` blocks.1 parent ef225c7 commit c820f72
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
0 commit comments