Skip to content

Commit b5893cd

Browse files
committed
stubs: export symbols properly
These two symbols were not correctly scoped, placing them inside of the swift namespace. This would change the linkage names and fail to link as a result. Scope one as the header properly places it in an extern "C" block. The gyb file is unable to find the desired runtime header, so explicitly mark the exported symbol as being exposed with C linkage.
1 parent 1abe85a commit b5893cd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

stdlib/public/stubs/LibcShims.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ size_t swift::_swift_stdlib_malloc_size(const void *ptr) {
9393
}
9494
#elif defined(_MSC_VER)
9595
#include <malloc.h>
96-
size_t _swift_stdlib_malloc_size(const void *ptr) {
96+
size_t swift::_swift_stdlib_malloc_size(const void *ptr) {
9797
return _msize(const_cast<void *>(ptr));
9898
}
9999
#elif defined(__FreeBSD__)

stdlib/public/stubs/UnicodeExtendedGraphemeClusters.cpp.gyb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ const uint16_t _swift_stdlib_ExtendedGraphemeClusterNoBoundaryRulesMatrixImpl[]
131131
% end
132132
};
133133
134+
extern "C"
134135
SWIFT_RUNTIME_STDLIB_INTERFACE
135136
const uint16_t *_swift_stdlib_ExtendedGraphemeClusterNoBoundaryRulesMatrix =
136137
_swift_stdlib_ExtendedGraphemeClusterNoBoundaryRulesMatrixImpl;

0 commit comments

Comments
 (0)