Skip to content

Commit 89067bf

Browse files
committed
Update swift-plugin-server.swift
1 parent 4eb70d9 commit 89067bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/swift-plugin-server/Sources/swift-plugin-server/swift-plugin-server.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ final class PluginHostConnection: MessageConnection {
172172
var ptr = buffer.baseAddress!
173173

174174
while (bytesToWrite > 0) {
175-
let writtenSize = PluginServer_write(handle, ptr, UInt(bytesToWrite))
175+
let writtenSize = PluginServer_write(handle, ptr, Int(bytesToWrite))
176176
if (writtenSize <= 0) {
177177
// error e.g. broken pipe.
178178
break
@@ -193,7 +193,7 @@ final class PluginHostConnection: MessageConnection {
193193
var ptr = buffer.baseAddress!
194194

195195
while bytesToRead > 0 {
196-
let readSize = PluginServer_read(handle, ptr, UInt(bytesToRead))
196+
let readSize = PluginServer_read(handle, ptr, Int(bytesToRead))
197197
if (readSize <= 0) {
198198
// 0: EOF (the host closed), -1: Broken pipe (the host crashed?)
199199
break;

0 commit comments

Comments
 (0)