test two-parameter withBorrowedName

This commit is contained in:
Guillaume Lessard committed 2023-08-10 15:35:27 -07:00
1 parent 5e03246e4e
commit d259ef476e
2 files changed
+17

No files matched your search

+1
View File
@@ -135,6 +135,7 @@ extension Mach.Port where RightType == Mach.ReceiveRight {
/// The underlying port right will be automatically deallocated when
/// the Mach.Port object is destroyed.
public init(name: mach_port_name_t, context: mach_port_context_t) {
precondition(name != mach_port_name_t(MACH_PORT_NULL), "Mach.Port cannot be initialized with MACH_PORT_NULL")
self._name = name
self._context = context
}