Changed the module.map to module.modulemap in order to support the latest clang compiler.

Removed several constants to support the latest ZeroMQ library.
Change the import path to recursive in order to find the zmq.h file.
This commit is contained in:
Jin Wang 2016-02-28 21:38:16 +11:00
parent d4e5da572c
commit 0d39215b03
3 changed files with 18 additions and 18 deletions

View File

@ -53,7 +53,7 @@
53C76A2F1C4EE1FE00F0357B /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
B00ED9E01BD8A2CD00BBBBAE /* SwiftZMQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftZMQ.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B00ED9EA1BD8A2CD00BBBBAE /* SwiftZMQTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftZMQTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
B00EDA021BD8A34B00BBBBAE /* module.map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.map; sourceTree = "<group>"; };
B00EDA021BD8A34B00BBBBAE /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
B00EDA131BD9FE3C00BBBBAE /* zmq_swift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = zmq_swift.h; sourceTree = "<group>"; };
B00EDA361BDDD1FB00BBBBAE /* Context.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Context.swift; sourceTree = "<group>"; };
B00EDA371BDDD1FB00BBBBAE /* CURVE.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CURVE.swift; sourceTree = "<group>"; };
@ -143,7 +143,7 @@
B00EDA001BD8A34B00BBBBAE /* ZeroMQ */ = {
isa = PBXGroup;
children = (
B00EDA021BD8A34B00BBBBAE /* module.map */,
B00EDA021BD8A34B00BBBBAE /* module.modulemap */,
B00EDA131BD9FE3C00BBBBAE /* zmq_swift.h */,
);
name = ZeroMQ;
@ -580,7 +580,7 @@
PRODUCT_NAME = SwiftZMQ;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "$(SRCROOT)/Dependencies";
SWIFT_INCLUDE_PATHS = "$(SRCROOT)/Dependencies/**";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
@ -613,7 +613,7 @@
PRODUCT_NAME = SwiftZMQ;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "$(SRCROOT)/Dependencies";
SWIFT_INCLUDE_PATHS = "$(SRCROOT)/Dependencies/**";
};
name = Release;
};

View File

@ -137,7 +137,7 @@ public final class Socket {
return message
}
public func receive(bufferSize bufferSize: Int = 256, mode: ReceiveMode = []) throws -> [Int8]? {
public func receive(bufferSize bufferSize: Int = 1024, mode: ReceiveMode = []) throws -> [Int8]? {
var buffer = [Int8](count: bufferSize, repeatedValue: 0)
let result = zmq_recv(socket, &buffer, bufferSize, Int32(mode.rawValue))
@ -439,9 +439,9 @@ extension Socket {
try setOption(ZMQ_TCP_KEEPALIVE_INTVL, value: &value, length: strideof(Int32))
}
public func setTCPRetransmitTimeout(var value: Int32) throws {
try setOption(ZMQ_TCP_RETRANSMIT_TIMEOUT, value: &value, length: strideof(Int32))
}
// public func setTCPRetransmitTimeout(var value: Int32) throws {
// try setOption(ZMQ_TCP_RETRANSMIT_TIMEOUT, value: &value, length: strideof(Int32))
// }
public func setTypeOfService(var value: Int32) throws {
try setOption(ZMQ_TOS, value: &value, length: strideof(Int32))
@ -458,10 +458,10 @@ extension Socket {
try setOption(ZMQ_XPUB_VERBOSE, value: &v, length: strideof(Int32))
}
public func setXPubVerboseUnsubscribe(value: Bool) throws {
var v = value ? 1 : 0
try setOption(ZMQ_XPUB_VERBOSE_UNSUBSCRIBE, value: &v, length: strideof(Int32))
}
// public func setXPubVerboseUnsubscribe(value: Bool) throws {
// var v = value ? 1 : 0
// try setOption(ZMQ_XPUB_VERBOSE_UNSUBSCRIBE, value: &v, length: strideof(Int32))
// }
public func setXPubManual(value: Bool) throws {
var v = value ? 1 : 0
@ -778,12 +778,12 @@ extension Socket {
return value
}
public func getTCPRetransmitTimeout() throws -> Int32 {
var value: Int32 = 0
var length = strideof(Int32)
try getOption(ZMQ_TCP_RETRANSMIT_TIMEOUT, value: &value, length: &length)
return value
}
// public func getTCPRetransmitTimeout() throws -> Int32 {
// var value: Int32 = 0
// var length = strideof(Int32)
// try getOption(ZMQ_TCP_RETRANSMIT_TIMEOUT, value: &value, length: &length)
// return value
// }
public func getThreadSafe() throws -> Bool {
var value: Int32 = 0