Upgrating to May 9 shapshot (#11)
* Upgrating to May 9 shapshot * Update C7 dependency to 0.7
This commit is contained in:
parent
e91e658abc
commit
94936685e7
|
@ -1 +1 @@
|
|||
swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a
|
||||
swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a
|
||||
|
|
|
@ -3,7 +3,7 @@ import PackageDescription
|
|||
let package = Package(
|
||||
name: "ZeroMQ",
|
||||
dependencies: [
|
||||
.Package(url: "https://github.com/open-swift/C7.git", majorVersion: 0, minor: 5),
|
||||
.Package(url: "https://github.com/open-swift/C7.git", majorVersion: 0, minor: 7),
|
||||
.Package(url: "https://github.com/Zewo/CZeroMQ.git", majorVersion: 0, minor: 5),
|
||||
]
|
||||
)
|
||||
|
|
|
@ -125,9 +125,8 @@ public final class Context {
|
|||
}
|
||||
|
||||
public func socket(_ type: SocketType) throws -> Socket {
|
||||
let socket = zmq_socket(context, type.rawValue)
|
||||
|
||||
if socket == nil {
|
||||
guard let socket = zmq_socket(context, type.rawValue) else {
|
||||
throw Error.lastError
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public final class Message {
|
|||
}
|
||||
}
|
||||
|
||||
public init(data: UnsafeMutablePointer<Void>, size: Int, hint: UnsafeMutablePointer<Void>? = nil, ffn: @convention(c) (UnsafeMutablePointer<Void>!, UnsafeMutablePointer<Void>!) -> Void) throws {
|
||||
public init(data: UnsafeMutablePointer<Void>, size: Int, hint: UnsafeMutablePointer<Void>? = nil, ffn: @convention(c) (UnsafeMutablePointer<Void>?, UnsafeMutablePointer<Void>?) -> Void) throws {
|
||||
message = zmq_msg_t()
|
||||
|
||||
if zmq_msg_init_data(&message, data, size, ffn, hint) == -1 {
|
||||
|
@ -72,9 +72,7 @@ public final class Message {
|
|||
}
|
||||
|
||||
public func getProperty(_ property: String) throws -> String {
|
||||
let result = zmq_msg_gets(&message, property)
|
||||
|
||||
if result == nil {
|
||||
guard let result = zmq_msg_gets(&message, property) else {
|
||||
throw Error.lastError
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue