Skip to content

Commit 45fdb08

Browse files
committed
pass a pointer instead of inout conversion
- this function is imported in a way that causes the compiler to not detect it as a C function
1 parent d45027b commit 45fdb08

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/_StringProcessing/Unicode/ScalarProps.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ extension Unicode.Script {
2929

3030
static func extensions(for scalar: Unicode.Scalar) -> [Unicode.Script] {
3131
var count: UInt8 = 0
32-
let pointer = _swift_string_processing_getScriptExtensions(scalar.value, &count)
33-
32+
let pointer = withUnsafeMutablePointer(to: &count) {
33+
_swift_string_processing_getScriptExtensions(scalar.value, &count)
34+
}
35+
3436
guard let pointer = pointer else {
3537
return [Unicode.Script(scalar)]
3638
}

0 commit comments

Comments
 (0)