Skip to content

Conversation

@rintaro
Copy link
Member

@rintaro rintaro commented Apr 22, 2024

compareMemory(_:_:_:) was to abstract memcmp or Collection.elementsEqual(_:) depending on the platform or build settings. Now that we consistently imports "platform" system module, so memcmp is reliably available.

@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

@swift-ci Please test

#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
Copy link
Member Author

@rintaro rintaro Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

🤔 https://ci.swift.org/job/swift-syntax-PR-macOS/4092/

/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface:13:64: error: unexpected code '...' in parameter clause
   11 |   return y < x ? y : x
   12 | }
   13 | @inlinable public func min<T>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T where T : Swift.Comparable {
      |                                                                `- error: unexpected code '...' in parameter clause
   14 |   var minValue = min(min(x, y), z)
   15 |   // In case `value == minValue`, we pick `minValue`. See min(_:_:).

@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

@swift-ci Please test macOS

@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

@swift-ci Please test Windows

@rintaro
Copy link
Member Author

rintaro commented Apr 23, 2024

Windows failure is probably because ucrt.modulemap is not a part of test (i.e. check-swift) dependencies in swift repo.

@rintaro
Copy link
Member Author

rintaro commented Apr 23, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

@swift-ci Please test Windows

`compareMemory(_:_:_:)` was to abstract `memcmp` or
`Collection.elementsEqual(_:)` depending on the platform or build
settings. Now that we consistently imports "platform" system module, so
`memcmp` is reliably available.
@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

swiftlang/swift#73224
@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

swiftlang/swift#73224
@swift-ci Please test Windows

2 similar comments
@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

swiftlang/swift#73224
@swift-ci Please test Windows

@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

swiftlang/swift#73224
@swift-ci Please test Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants