Merge branch 'feature/6.3b4' into develop
This commit is contained in:
commit
74318e8c57
|
@ -6,11 +6,13 @@ blocks instead of function pointer callbacks.
|
|||
|
||||
###Targets
|
||||
|
||||
Updated to use Swift v0.2.3 (aka Xcode 6.3 beta).
|
||||
|
||||
The project includes two targets:
|
||||
- SwiftyExpat
|
||||
- SwiftyExpatTests
|
||||
|
||||
I suggest you start out looking at the SwiftyExpatTests.
|
||||
I suggest you start by looking at the SwiftyExpatTests.
|
||||
|
||||
####SwiftyExpat
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ public extension Expat { // Namespaces
|
|||
{
|
||||
let sep = self.nsSeparator // so that we don't capture 'self' (necessary?)
|
||||
return onStartElement {
|
||||
let comps = split($0, { $0 == sep }, maxSplit: 1, allowEmptySlices: false)
|
||||
let comps = split($0, maxSplit: 1, allowEmptySlices: false) { $0 == sep }
|
||||
cb(comps[0], comps[1], $1)
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ public extension Expat { // Namespaces
|
|||
public func onEndElementNS(cb: ( String, String ) -> Void) -> Self {
|
||||
let sep = self.nsSeparator // so that we don't capture 'self' (necessary?)
|
||||
return onEndElement {
|
||||
let comps = split($0, { $0 == sep }, maxSplit: 1, allowEmptySlices: false)
|
||||
let comps = split($0, maxSplit: 1, allowEmptySlices: false) { $0 == sep }
|
||||
cb(comps[0], comps[1])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// Hack to compare values if we don't have access to the members of the struct,
|
||||
// eg XML_Error in v0.0.4
|
||||
public func isByteEqual<T>(var lhs: T, var rhs: T) -> Bool {
|
||||
return memcmp(&lhs, &rhs, UInt(sizeof(T))) == 0
|
||||
return memcmp(&lhs, &rhs, sizeof(T)) == 0
|
||||
}
|
||||
|
||||
extension String {
|
||||
|
@ -27,7 +27,7 @@ extension String {
|
|||
|
||||
let buflen = length + 1
|
||||
var buf = UnsafeMutablePointer<CChar>.alloc(buflen)
|
||||
memcpy(buf, cs, UInt(length))
|
||||
memcpy(buf, cs, length)
|
||||
buf[length] = 0 // zero terminate
|
||||
let s = String.fromCString(buf)
|
||||
buf.dealloc(buflen)
|
||||
|
|
Loading…
Reference in New Issue