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:
Cory Benfield authored and GitHub committed 2021-03-09 12:18:33 +00:00
1 parent 006645ddfc
commit 3be4e09800
1 file changed
+4
+4
View File
@@ -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.