mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Make HTTP Parser import implementationOnly (#1776)
Motivation: Non-implementation-only imports in Swift have an annoying tendency to put C header files into all downstream build paths. The result is that leaf packages that include any C header files run a very high risk of colliding with declarations in the inner header files. In this case, we've had users bump into issues with the HTTP_STATUS_* enum cases already. Modifications: - Make CNIOHTTPParser import implementationOnly where possible. Result: Fewer risks of colliding symbols.
This commit is contained in:
1 parent
006645ddfc
commit
3be4e09800
1 file changed
+4
@@ -13,7 +13,11 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import NIO
|
||||
#if compiler(>=5.1)
|
||||
@_implementationOnly import CNIOHTTPParser
|
||||
#else
|
||||
import CNIOHTTPParser
|
||||
#endif
|
||||
|
||||
private extension UnsafeMutablePointer where Pointee == http_parser {
|
||||
/// Returns the `KeepAliveState` for the current message that is parsed.
|
||||
|
||||
Reference in new issue
Block a user