Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixing typing issue on macOS
  • Loading branch information
Ken Ackerson committed Jun 11, 2024
commit c379025f55963ae3380de9061141c599ca0a1d3b
6 changes: 6 additions & 0 deletions Xcode/Sources/String+File.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ extension String {
fclose(pointer)
}

#if os(Windows)
public func seek(_ offset: Int32) -> Bool {
return (fseek(pointer, offset, SEEK_SET) == 0)
}
#else
public func seek(_ offset: Int) -> Bool {
return (fseek(pointer, offset, SEEK_SET) == 0)
}
#endif

public func read(_ data: inout [UInt8]) throws -> Int {
if data.count <= 0 {
Expand Down