Skip to content

Commit ca9113c

Browse files
committed
[embedded] Adjust test/embedded/dependencies-no-allocations.swift for correct putchar signature
1 parent 0c078e8 commit ca9113c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/embedded/dependencies-no-allocations.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@
2727
// UNSUPPORTED: OS=linux-gnu && CPU=aarch64
2828

2929
@_silgen_name("putchar")
30-
func putchar(_: UInt8)
30+
@discardableResult
31+
func putchar(_: CInt) -> CInt
3132

3233
public func print(_ s: StaticString, terminator: StaticString = "\n") {
3334
var p = s.utf8Start
3435
while p.pointee != 0 {
35-
putchar(p.pointee)
36+
putchar(CInt(p.pointee))
3637
p += 1
3738
}
3839
p = terminator.utf8Start
3940
while p.pointee != 0 {
40-
putchar(p.pointee)
41+
putchar(CInt(p.pointee))
4142
p += 1
4243
}
4344
}

0 commit comments

Comments
 (0)