merge timeouts fixes for 1.2

This commit is contained in:
Erik 2015-03-16 09:06:45 -04:00
parent 7765e57a11
commit c6d0331d50
4 changed files with 217 additions and 217 deletions

View File

@ -180,7 +180,7 @@ public class SocketEngine: NSObject, WebSocketDelegate {
// println(data)
if let str = NSString(data: data, encoding: NSUTF8StringEncoding) {
dispatch_async(self!.parseQueue) {callback(str)}
dispatch_async(self!.parseQueue) {callback(str as String)}
}
self?.waitingForPoll = false

View File

@ -196,7 +196,7 @@ class SocketEvent {
// if it is a placeholder for data
if let str = value as? String {
if let num = str["~~(\\d)"].groups() {
newDict[key as String] = self.datas[num[1].toInt()!]
newDict[key as! String] = self.datas[num[1].toInt()!]
} else {
newDict[key as! String] = str
}

View File

@ -43,7 +43,7 @@ public class SwiftRegex: NSObject, BooleanType {
}
final var targetRange: NSRange {
return NSRange(location: 0,length: countElements(target))
return NSRange(location: 0,length: count(target))
}
final func substring(range: NSRange) -> String? {
@ -102,7 +102,7 @@ public class SwiftRegex: NSObject, BooleanType {
let mut = NSMutableString(string: target)
mut.replaceCharactersInRange(match.rangeAtIndex(groupno), withString: replacement)
target = mut
target = mut as String
}
}
}
@ -154,7 +154,7 @@ public class SwiftRegex: NSObject, BooleanType {
out.appendString(substring( NSRange(location:pos, length:targetRange.length-pos))!)
return out
return out as String
}
public var boolValue: Bool {